안이쁜데
This commit is contained in:
+10
-6
@@ -208,12 +208,16 @@ function ngGenerateAPI<R extends ValidResponse, E extends InvalidResponse, Q ext
|
||||
);
|
||||
}
|
||||
|
||||
export function ngGET<R extends ValidResponse, E extends InvalidResponse, Q extends RawArgType, PD extends ProcDecoratorChain>(args: {
|
||||
argValidator?: ValidatorType<Q>,
|
||||
procDecoratorChain: PD,
|
||||
callback: (query: Q, ctx: ResolveChain<PD>, expressReq: Request, expressRes: Response) => Promise<R | E | true>,
|
||||
}): ngAPIExecuter<R, E, Q, PD>{
|
||||
return ngGenerateAPI<R, E, Q, PD>('get', args);
|
||||
export function ngGET<R extends ValidResponse, E extends InvalidResponse, Q extends RawArgType>(argValidator?: ValidatorType<Q>){
|
||||
return <PD extends ProcDecoratorChain>(procDecoratorChain: PD) => {
|
||||
return (callback: (query: Q, ctx: ResolveChain<PD>, expressReq: Request, expressRes: Response) => Promise<R | E | true>) => {
|
||||
return ngGenerateAPI<R, E, Q, PD>('get', {
|
||||
argValidator,
|
||||
procDecoratorChain,
|
||||
callback,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface ngGET<R extends ValidResponse, E extends InvalidResponse, Q extends RawArgType, PD extends ProcDecoratorChain> extends ngAPIExecuter<R, E, Q, PD>{
|
||||
|
||||
Reference in New Issue
Block a user