rename to resource rules and add api endpoints

This commit is contained in:
Owen 2025-02-08 17:02:22 -05:00
parent 3cd20cab55
commit da3c8823f8
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
8 changed files with 321 additions and 15 deletions

View file

@ -372,7 +372,7 @@ export const versionMigrations = sqliteTable("versionMigrations", {
executedAt: integer("executedAt").notNull()
});
export const badgerRules = sqliteTable("badgerRules", {
export const resourceRules = sqliteTable("resourceRules", {
ruleId: integer("ruleId").primaryKey({ autoIncrement: true }),
resourceId: integer("resourceId")
.notNull()
@ -414,4 +414,4 @@ export type ResourceOtp = InferSelectModel<typeof resourceOtp>;
export type ResourceAccessToken = InferSelectModel<typeof resourceAccessToken>;
export type ResourceWhitelist = InferSelectModel<typeof resourceWhitelist>;
export type VersionMigration = InferSelectModel<typeof versionMigrations>;
export type BadgerRule = InferSelectModel<typeof badgerRules>;
export type ResourceRule = InferSelectModel<typeof resourceRules>;