API Structure 재정비
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import { APIPathGen } from "./APIPathGen";
|
||||
import { extractHttpMethod } from "../apiStructure/defs";
|
||||
import type { APITail, RawArgType } from "../apiStructure/defs";
|
||||
import { structure } from "../apiStructure/sammoRootAPI";
|
||||
import { callClientAPI } from "./generator";
|
||||
|
||||
export const SammoRootAPI = APIPathGen(structure, (path: string[], tail: APITail, pathParam) => {
|
||||
const method = extractHttpMethod(tail);
|
||||
const method = tail.reqType;
|
||||
return (args?: RawArgType, returnError?: boolean) => {
|
||||
if (returnError) {
|
||||
return callClientAPI(method, path.join('/'), args, pathParam, true);
|
||||
|
||||
Reference in New Issue
Block a user