58 lines
1.2 KiB
TypeScript
58 lines
1.2 KiB
TypeScript
import { RequestMethod } from '@nestjs/common';
|
|
import { RouteInfo } from '@nestjs/common/interfaces';
|
|
|
|
export const excludeAuth = [
|
|
{
|
|
path: 'admin/auth/login',
|
|
method: RequestMethod.POST,
|
|
},
|
|
{
|
|
path: 'admin/auth/forgot-password',
|
|
method: RequestMethod.POST,
|
|
},
|
|
{
|
|
path: '/admin/bids/record/(.*)',
|
|
method: RequestMethod.GET,
|
|
},
|
|
] as (string | RouteInfo)[];
|
|
|
|
export const clientExcludeAuth = [
|
|
{ path: '/admin/(.*)', method: RequestMethod.ALL },
|
|
{
|
|
path: 'auth/generate-token',
|
|
method: RequestMethod.POST,
|
|
},
|
|
{
|
|
path: 'extensions/policy',
|
|
method: RequestMethod.GET,
|
|
},
|
|
{
|
|
path: 'bids/hook-action',
|
|
method: RequestMethod.POST,
|
|
},
|
|
{
|
|
path: 'scrap-items',
|
|
method: RequestMethod.GET,
|
|
},
|
|
] as (string | RouteInfo)[];
|
|
|
|
export const excludeAuthor = [
|
|
...excludeAuth,
|
|
{
|
|
path: 'admin/auth/change-password',
|
|
method: RequestMethod.POST,
|
|
},
|
|
{
|
|
path: 'admin/auth/logout',
|
|
method: RequestMethod.POST,
|
|
},
|
|
{
|
|
path: 'admin/auth/me',
|
|
method: RequestMethod.GET,
|
|
},
|
|
{
|
|
path: '/admin/bids/record/(.*)',
|
|
method: RequestMethod.GET,
|
|
},
|
|
] as (string | RouteInfo)[];
|