Organize directories
This commit is contained in:
parent
8a91c9b89b
commit
4898382f78
433 changed files with 0 additions and 0 deletions
21
apps/metamigo-api/app/routes/helpers/index.ts
Normal file
21
apps/metamigo-api/app/routes/helpers/index.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import * as Metamigo from "common";
|
||||
import Toys from "@hapipal/toys";
|
||||
|
||||
export const withDefaults = Toys.withRouteDefaults({
|
||||
options: {
|
||||
cors: true,
|
||||
auth: "nextauth-jwt",
|
||||
validate: {
|
||||
failAction: Metamigo.validatingFailAction,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const noAuth = Toys.withRouteDefaults({
|
||||
options: {
|
||||
cors: true,
|
||||
validate: {
|
||||
failAction: Metamigo.validatingFailAction,
|
||||
},
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue