-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move security dtos to security library and create eslint enforce…
…ment rule (#45)
- Loading branch information
Showing
7 changed files
with
20 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './login-body.dto'; | ||
export * from './signup-body.dto'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ZodDtoClass } from '@unteris/server/zod-pipe'; | ||
import { LoginBodySchema } from '@unteris/shared/types'; | ||
|
||
export class LoginBodyDto extends ZodDtoClass<typeof LoginBodySchema> { | ||
static override schema = LoginBodySchema; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ZodDtoClass } from '@unteris/server/zod-pipe'; | ||
import { SignupSchema } from '@unteris/shared/types'; | ||
|
||
export class SignupBody extends ZodDtoClass<typeof SignupSchema> { | ||
static override schema = SignupSchema; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
import { ZodDtoClass } from '@unteris/server/zod-pipe'; | ||
import { z } from 'zod'; | ||
|
||
const LoginBodySchema = z.object({ | ||
export const LoginBodySchema = z.object({ | ||
email: z.string().email(), | ||
password: z.string().min(12), | ||
}); | ||
|
||
export class LoginBodyDto extends ZodDtoClass<typeof LoginBodySchema> { | ||
static override schema: z.ZodType<any, z.ZodTypeDef, any> = LoginBodySchema; | ||
} | ||
|
||
export type LoginBody = z.infer<typeof LoginBodySchema>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters