Format files and fix http response

This commit is contained in:
Owen Schwartz 2024-10-06 18:05:20 -04:00
parent c6fbffdc1b
commit 7535f277b1
49 changed files with 2428 additions and 2404 deletions

View file

@ -130,7 +130,7 @@ export const passwordResetTokens = sqliteTable("passwordResetTokens", {
});
export const actions = sqliteTable("actions", {
actionId: integer("actionId").primaryKey({ autoIncrement: true }),
actionId: text("actionId").primaryKey(),
name: text("name").notNull(),
description: text("description"),
});
@ -146,7 +146,7 @@ export const roleActions = sqliteTable("roleActions", {
roleId: integer("roleId")
.notNull()
.references(() => roles.roleId, { onDelete: "cascade" }),
actionId: integer("actionId")
actionId: text("actionId")
.notNull()
.references(() => actions.actionId, { onDelete: "cascade" }),
orgId: integer("orgId")
@ -158,7 +158,7 @@ export const userActions = sqliteTable("userActions", {
userId: text("userId")
.notNull()
.references(() => users.id, { onDelete: "cascade" }),
actionId: integer("actionId")
actionId: text("actionId")
.notNull()
.references(() => actions.actionId, { onDelete: "cascade" }),
orgId: integer("orgId")