rootAPI to gatewayAPI

This commit is contained in:
Hide_D committed 2023-08-20 06:07:06 +00:00
1 parent 56a9c5bc45
commit f4640abe17
14 files changed
+21 -21

No files matched your search

@@ -1,11 +1,11 @@
import { APIPathGen } from "./APIPathGen.js";
import type { APITail, RawArgType } from "../apiStructure/defs.js";
import { structure } from "../apiStructure/sammoRootAPI.js";
import { structure } from "../apiStructure/sammoGatewayAPI.js";
import { callClientAPI } from "./generator.js";
const apiRoot = process.env.API_ROOT_PATH ?? process.env.VITE_API_ROOT_PATH ?? '/rootAPI';
export const SammoRootAPI = APIPathGen(structure, (path: string[], tail: APITail, pathParam) => {
export const SammoGatewayAPI = APIPathGen(structure, (path: string[], tail: APITail, pathParam) => {
const method = tail.reqType;
return (args?: RawArgType, returnError?: boolean) => {
if (returnError) {