rootAPI to gatewayAPI
This commit is contained in:
@@ -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) {
|
||||
Reference in New Issue
Block a user