From 2a1cf8114ebd7805dd7c93b113369bdf7f2b28eb Mon Sep 17 00:00:00 2001 From: aronmal Date: Thu, 11 Jan 2024 11:41:37 +0100 Subject: [PATCH] Fix: schema, move favicon and config page --- public/{assets => }/favicon.ico | Bin src/drizzle/schema.ts | 15 ++++---- src/entry-server.tsx | 2 +- src/routes/config.tsx | 57 ----------------------------- src/routes/config/[guildId].tsx | 61 ++++++++++++++++++++++++++++++++ 5 files changed, 69 insertions(+), 66 deletions(-) rename public/{assets => }/favicon.ico (100%) delete mode 100644 src/routes/config.tsx create mode 100644 src/routes/config/[guildId].tsx diff --git a/public/assets/favicon.ico b/public/favicon.ico similarity index 100% rename from public/assets/favicon.ico rename to public/favicon.ico diff --git a/src/drizzle/schema.ts b/src/drizzle/schema.ts index 4ddad6a..8fdd83b 100644 --- a/src/drizzle/schema.ts +++ b/src/drizzle/schema.ts @@ -12,23 +12,22 @@ import { } from "drizzle-orm/pg-core"; export const users = pgTable("user", { - id: text("id").primaryKey(), + id: text("id").notNull().primaryKey(), name: text("name"), email: text("email").notNull(), - emailVerified: timestamp("email_verified", { mode: "date" }), + emailVerified: timestamp("emailVerified", { mode: "date" }), image: text("image"), - createdAt: timestamp("created_at").defaultNow(), }); export const accounts = pgTable( "account", { - userId: text("user_id") + userId: text("userId") .notNull() .references(() => users.id, { onDelete: "cascade" }), type: text("type").$type().notNull(), provider: text("provider").notNull(), - providerAccountId: text("provider_account_id").notNull(), + providerAccountId: text("providerAccountId").notNull(), refresh_token: text("refresh_token"), access_token: text("access_token"), expires_at: integer("expires_at"), @@ -45,15 +44,15 @@ export const accounts = pgTable( ); export const sessions = pgTable("session", { - sessionToken: text("session_token").primaryKey(), - userId: text("user_id") + sessionToken: text("sessionToken").notNull().primaryKey(), + userId: text("userId") .notNull() .references(() => users.id, { onDelete: "cascade" }), expires: timestamp("expires", { mode: "date" }).notNull(), }); export const verificationTokens = pgTable( - "verification_token", + "verificationToken", { identifier: text("identifier").notNull(), token: text("token").notNull(), diff --git a/src/entry-server.tsx b/src/entry-server.tsx index e86af36..78cbfb2 100644 --- a/src/entry-server.tsx +++ b/src/entry-server.tsx @@ -7,7 +7,7 @@ export default createHandler(() => ( - + {assets} diff --git a/src/routes/config.tsx b/src/routes/config.tsx deleted file mode 100644 index de20950..0000000 --- a/src/routes/config.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import "../styles/pages/config.scss"; - -function config() { - return ( -
-

Configure li'l Judd in

-
-
-
- Server pfp -

li'l Judds home base

-
-
- -
-

Timezone

-

Set the timezone for your server.

- -
-
-
-

Features

-

Configure the features of the bot

-
-
-
-

Time Planning

- -
- -
-

Enable pingable Roles

- -
-
-
- -
-
- ); -} - -export default config; diff --git a/src/routes/config/[guildId].tsx b/src/routes/config/[guildId].tsx new file mode 100644 index 0000000..86abceb --- /dev/null +++ b/src/routes/config/[guildId].tsx @@ -0,0 +1,61 @@ +import "../styles/pages/config.scss"; + +function config() { + return ( +
+

Configure li'l Judd in

+
+
+
+ Server pfp +

li'l Judds home base

+
+
+ +
+

Timezone

+

Set the timezone for your server.

+ +
+
+
+

Features

+

Configure the features of the bot

+
+
+
+

Time Planning

+ +
+ +
+

Enable pingable Roles

+ +
+
+
+ +
+
+ ); +} + +export default config;