refac: api 시스템 교체
- procDecorator의 타입 복잡도를 낮춤 - 타입 에러가 살짝 더 깔끔함
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
import { GET } from "../defs";
|
||||
import type { structure } from "../../apiStructure/sammoRootAPI";
|
||||
import type { ExtractError, ExtractQuery, ExtractResponse } from "../../apiStructure/defs";
|
||||
import { declProcDecorators } from "../ProcDecorator/base";
|
||||
|
||||
type BaseAPI = typeof structure.Login.ReqNonce;
|
||||
type RType = ExtractResponse<BaseAPI>;
|
||||
type EType = ExtractError<BaseAPI>;
|
||||
type QType = ExtractQuery<BaseAPI>;
|
||||
const argValidator = undefined;
|
||||
const procDecorator = [] as const;
|
||||
|
||||
export const ReqNonce = GET<RType, EType, QType>(argValidator)(procDecorator)(
|
||||
(query, ctx, req, res) => {
|
||||
export const ReqNonce = GET<RType, EType, QType>
|
||||
(argValidator)
|
||||
(declProcDecorators([] as const))
|
||||
(() => {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user