Skip to content

Commit

Permalink
Make password digest required props
Browse files Browse the repository at this point in the history
 (#11)
  • Loading branch information
shunsei committed Oct 16, 2024
1 parent d04db66 commit 3f94907
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions api/components/schemas/User.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ required:
- id
- name
- email
- passwordDigest
8 changes: 4 additions & 4 deletions backend/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export const getUsersResponseItem = zod.object({
"id": zod.number(),
"name": zod.string(),
"email": zod.string().email(),
"passwordDigest": zod.string().optional(),
"passwordDigest": zod.string(),
"sessionToken": zod.string().nullish()
})
export const getUsersResponse = zod.array(getUsersResponseItem)
Expand Down Expand Up @@ -208,7 +208,7 @@ export const getUserResponse = zod.object({
"id": zod.number(),
"name": zod.string(),
"email": zod.string().email(),
"passwordDigest": zod.string().optional(),
"passwordDigest": zod.string(),
"sessionToken": zod.string().nullish()
})

Expand All @@ -234,7 +234,7 @@ export const updateUserResponse = zod.object({
"id": zod.number(),
"name": zod.string(),
"email": zod.string().email(),
"passwordDigest": zod.string().optional(),
"passwordDigest": zod.string(),
"sessionToken": zod.string().nullish()
})

Expand Down Expand Up @@ -332,7 +332,7 @@ export const loginResponse = zod.object({
"id": zod.number(),
"name": zod.string(),
"email": zod.string().email(),
"passwordDigest": zod.string().optional(),
"passwordDigest": zod.string(),
"sessionToken": zod.string().nullish()
})

Expand Down

0 comments on commit 3f94907

Please sign in to comment.