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

22 lines
605 B
TypeScript
Raw Normal View History

2024-10-16 02:27:59 +01:00
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);
}
}