stuff
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
CREATE TABLE games (
|
||||
CREATE TABLE repos (
|
||||
id text,
|
||||
name text, -- user defined
|
||||
repo_fullname text, -- e.g. "username/reponame"
|
||||
repo_hosttype text, -- "github", "gitea", "gitlab", ...
|
||||
repo_token text, -- an api auth token to read from the repo
|
||||
user_id text
|
||||
)
|
@ -1,7 +1,7 @@
|
||||
CREATE TABLE game_instances (
|
||||
CREATE TABLE releases (
|
||||
id text,
|
||||
game_id text,
|
||||
cart_data text,
|
||||
created_at time,
|
||||
is_official boolean
|
||||
repo_id text,
|
||||
release_number integer,
|
||||
cart_png_base64 text,
|
||||
created_at time
|
||||
)
|
24
src/server/api/release.ts
Normal file
24
src/server/api/release.ts
Normal 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>;
|
@ -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;
|
Reference in New Issue
Block a user