Skip to content

Commit

Permalink
Key hash params field added according to latest changes in #65
Browse files Browse the repository at this point in the history
  • Loading branch information
pkarw committed Aug 1, 2024
1 parent 7d34912 commit 65efae1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/api/db/create/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { getErrorMessage } from "@/lib/utils";



// clear all the database
// This is the UC01 implementation of https://github.com/CatchTheTornado/patient-pad/issues/65
export async function POST(request: Request) {
}
2 changes: 2 additions & 0 deletions src/data/dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export const ConfigDTOEncSettings: DTOEncryptionSettings = { ecnryptedFields: [
export type ConfigDTO = z.infer<typeof configDTOSchema>;

export const keyDTOSchema = z.object({
keyLocatorHash: z.string().min(1),
keyHash: z.string().min(1),
keyHashParams: z.string().min(1),
databaseIdHash: z.string().min(1),
encryptedMasterKey: z.string().min(1),
acl: z.string().nullable(),
Expand Down
4 changes: 3 additions & 1 deletion src/data/server/db-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ export const config = sqliteTable('config', {
});

export const keys = sqliteTable('keys', {
keyHash: text('keyHash').primaryKey(),
keyLocatorHash: text('keyLocatorHash').primaryKey(),
databaseIdHash: text('databaseIdHash', { mode: 'text' }).notNull(),
keyHash: text('keyHash').notNull(),
keyHashParams: text('keyHashParams').notNull(),
encryptedMasterKey: text('encryptedMasterKey').notNull(),
acl: text('acl'),
extra: text('extra'),
Expand Down

0 comments on commit 65efae1

Please sign in to comment.