This commit is contained in:
dylan
2024-03-25 00:29:43 -07:00
parent 334c09df7c
commit f960083e94
8 changed files with 213 additions and 26 deletions

24
src/server/api/release.ts Normal file
View File

@ -0,0 +1,24 @@
import { Type } from "@sinclair/typebox";
import { FirRouteInput, FirRouteOptions } from "../util/routewrap.js";
const method = "POST";
const url = "/release";
// const payloadT = Type.Object({
// png: Type.String(),
// });
const payloadT = Type.Any();
const handler = ({payload}: FirRouteInput<typeof payloadT>) => {
const {png} = payload;
console.log(png);
// return payload;
};
export default {
method,
url,
payloadT,
handler,
} as const satisfies FirRouteOptions<typeof payloadT>;

View File

@ -1,9 +1,11 @@
import echo from "./api/echo.ts";
import release from "./api/release.ts";
import webhook from "./api/webhook.ts";
export const routeList = [
echo,
webhook,
release,
];
export type RouteList = typeof routeList;