Updates
This commit is contained in:
Vendored
+1
-1
@@ -7,4 +7,4 @@ export default function clientCrudFetch<T extends {
|
||||
[k: string]: any;
|
||||
} = {
|
||||
[k: string]: any;
|
||||
}>({ table, basePath, body, query, targetId, method, apiOrigin, }: ClientCrudFetchParams<T, P>): Promise<APIResponseObject<PostInsertReturn | R[]>>;
|
||||
}>({ table, basePath, body, query, targetId, method, apiOrigin, headers, }: ClientCrudFetchParams<T, P>): Promise<APIResponseObject<PostInsertReturn | R[]>>;
|
||||
|
||||
Vendored
+2
-1
@@ -17,7 +17,7 @@ const path_1 = __importDefault(require("path"));
|
||||
const serialize_query_1 = __importDefault(require("../../package-shared/utils/serialize-query"));
|
||||
const fetch_1 = __importDefault(require("../fetch"));
|
||||
function clientCrudFetch(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ table, basePath, body, query, targetId, method = "GET", apiOrigin, }) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ table, basePath, body, query, targetId, method = "GET", apiOrigin, headers, }) {
|
||||
try {
|
||||
let pathname = basePath || ``;
|
||||
pathname = path_1.default.join(pathname, String(table));
|
||||
@@ -33,6 +33,7 @@ function clientCrudFetch(_a) {
|
||||
const res = yield (0, fetch_1.default)(pathname, {
|
||||
method,
|
||||
body,
|
||||
headers,
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user