Final artifact touchups and start tierlist works

Co-authored-by: Gunshin <[email protected]>
This commit is contained in:
2025-09-29 22:32:43 +07:00
co-authored by Gunshin
Unverified
parent 39e7b435a7
commit ca652d273d
17 changed files with 192 additions and 46 deletions
+5 -1
View File
@@ -7,7 +7,9 @@ import * as schema from "$/db/schema";
export const auth = betterAuth({
emailAndPassword: {
enabled: true,
// disableSignUp: true,
},
trustedOrigins: ["http://nyx:3000"],
database: drizzleAdapter(db, {
provider: "pg", // or "mysql", "sqlite"
schema,
@@ -21,5 +23,7 @@ export async function apiAuthCheck() {
headers: await headers(),
});
console.log(session);
return session?.user;
}
}
+15 -11
View File
@@ -1,14 +1,14 @@
import {
type AnyPgColumn,
boolean,
date,
integer,
pgEnum,
pgSchema,
pgTable,
serial,
text,
timestamp,
type AnyPgColumn,
boolean,
date,
integer,
pgEnum,
pgSchema,
pgTable,
serial,
text,
timestamp,
} from "drizzle-orm/pg-core";
import { uuidv7 } from "uuidv7";
import { bytea } from "./custom";
@@ -119,9 +119,13 @@ export const tierlistBadges = tierlist.table("badges", {
});
export const tierlistVersions = tierlist.table("versions", {
id: text().primaryKey().$defaultFn(uuidv7),
id: text().primaryKey(),
name: text().notNull(),
hidden: boolean().notNull().default(false),
type: text()
.notNull()
.references(() => tierlistTypes.id),
image: text().references(() => cdn.id),
});
export const tierlistStates = tierlist.table("states", {