This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
scoresaber-reloadedv3/projects/backend/src/controller/replay.controller.ts
Liam a5e00e4850
Some checks failed
Deploy Backend / deploy (push) Has been cancelled
Deploy Website / deploy (push) Failing after 2m19s
add leaderboard embed image
2024-10-16 02:27:59 +01:00

22 lines
605 B
TypeScript

import { Controller, Get } from "elysia-decorators";
import { t } from "elysia";
import { ReplayService } from "../service/replay.service";
@Controller("/replay")
export default class ReplayController {
@Get("/:playerId/:leaderboardId", {
config: {},
params: t.Object({
playerId: t.String({ required: true }),
leaderboardId: t.String({ required: true }),
}),
})
public async getOpenGraphImage({
params: { playerId, leaderboardId },
}: {
params: { playerId: string; leaderboardId: string };
}) {
return ReplayService.getReplay(playerId, leaderboardId);
}
}