Final artifact touchups and start tierlist works
Co-authored-by: Gunshin <[email protected]>
This commit is contained in:
+5
-1
@@ -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
@@ -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", {
|
||||
|
||||
Reference in New Issue
Block a user