generated from phucvinh57/fastify-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'staging' into feature/update-excute-and-checkout-api
- Loading branch information
Showing
11 changed files
with
215 additions
and
17 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
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,5 +1,15 @@ | ||
import { Static, Type } from '@sinclair/typebox'; | ||
|
||
export const AcceptedExtensionDto = Type.Array(Type.String()); | ||
export const ServiceFeeDto = Type.Number(); | ||
export const CoinPerPageDto = Type.Number(); | ||
export const CoinPerSemDto = Type.Number(); | ||
export const DollarToCoinDto = Type.Number(); | ||
export const MaxFileSizeDto = Type.Number(); | ||
|
||
export type AcceptedExtensionDto = Static<typeof AcceptedExtensionDto>; | ||
export type ServiceFeeDto = Static<typeof ServiceFeeDto>; | ||
export type CoinPerPageDto = Static<typeof CoinPerPageDto>; | ||
export type CoinPerSemDto = Static<typeof CoinPerSemDto>; | ||
export type DollarToCoinDto = Static<typeof DollarToCoinDto>; | ||
export type MaxFileSizeDto = Static<typeof MaxFileSizeDto>; |
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
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
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
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,6 +1,7 @@ | ||
import { FastifyRequest, FastifyReply, RouteGenericInterface } from 'fastify'; | ||
import { UserRole } from 'src/types/auth'; | ||
|
||
export type Handler<RS = unknown, RQ extends RouteGenericInterface = Record<string, never>> = ( | ||
req: FastifyRequest<RQ> & { userId: string }, | ||
req: FastifyRequest<RQ> & { userId: string } & { roles: UserRole[] }, | ||
res: FastifyReply | ||
) => Result<RS>; |
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