endpoint返回参数增加statusCode声明
This commit is contained in:
parent
f9625d9bc9
commit
8484b33da2
|
|
@ -40,6 +40,7 @@ export declare class AppLoader<ED extends EntityDict & BaseEntityDict, Cxt exten
|
||||||
getEndpoints(prefix: string): [string, "post" | "get" | "put" | "delete", string, (params: Record<string, string>, headers: IncomingHttpHeaders, req: IncomingMessage, body?: any) => Promise<{
|
getEndpoints(prefix: string): [string, "post" | "get" | "put" | "delete", string, (params: Record<string, string>, headers: IncomingHttpHeaders, req: IncomingMessage, body?: any) => Promise<{
|
||||||
headers?: Record<string, string | string[]> | undefined;
|
headers?: Record<string, string | string[]> | undefined;
|
||||||
data: any;
|
data: any;
|
||||||
|
statusCode?: number | undefined;
|
||||||
}>][];
|
}>][];
|
||||||
protected operateInWatcher<T extends keyof ED>(entity: T, operation: ED[T]['Update'], context: Cxt, singleton?: true): Promise<OperationResult<ED>>;
|
protected operateInWatcher<T extends keyof ED>(entity: T, operation: ED[T]['Update'], context: Cxt, singleton?: true): Promise<OperationResult<ED>>;
|
||||||
protected selectInWatcher<T extends keyof ED>(entity: T, selection: ED[T]['Selection'], context: Cxt, forUpdate?: true, singleton?: true): Promise<Partial<ED[T]["Schema"]>[]>;
|
protected selectInWatcher<T extends keyof ED>(entity: T, selection: ED[T]['Selection'], context: Cxt, forUpdate?: true, singleton?: true): Promise<Partial<ED[T]["Schema"]>[]>;
|
||||||
|
|
|
||||||
|
|
@ -324,6 +324,7 @@ export class AppLoader<ED extends EntityDict & BaseEntityDict, Cxt extends Backe
|
||||||
const endPointRouters: Array<[EndpointItem<ED, Cxt>['name'], EndpointItem<ED, Cxt>['method'], string, (params: Record<string, string>, headers: IncomingHttpHeaders, req: IncomingMessage, body?: any) => Promise<{
|
const endPointRouters: Array<[EndpointItem<ED, Cxt>['name'], EndpointItem<ED, Cxt>['method'], string, (params: Record<string, string>, headers: IncomingHttpHeaders, req: IncomingMessage, body?: any) => Promise<{
|
||||||
headers?: Record<string, string | string[]>;
|
headers?: Record<string, string | string[]>;
|
||||||
data: any;
|
data: any;
|
||||||
|
statusCode?: number;
|
||||||
}>]> = [];
|
}>]> = [];
|
||||||
const endPointMap: Record<string, true> = {};
|
const endPointMap: Record<string, true> = {};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue