This commit is contained in:
jusax23 2023-03-24 21:19:46 +01:00
parent 5c73b83c87
commit e0011ae7ca
Signed by: jusax23
GPG key ID: 499E2AA870C1CD41

View file

@ -41,7 +41,7 @@ export const getCategories: Act = {
} }
}; };
export const addCategories: Act = { export const addCategory: Act = {
state: STATE.client | STATE.remote, state: STATE.client | STATE.remote,
right: 0, right: 0,
data: { data: {
@ -54,7 +54,7 @@ export const addCategories: Act = {
func: async (client: Client, data: any, aws: (code: string, data: any) => void) => { func: async (client: Client, data: any, aws: (code: string, data: any) => void) => {
if (!checkSelfTag(data.server)) { if (!checkSelfTag(data.server)) {
if (client.state != STATE.client) return void aws("error", "right"); if (client.state != STATE.client) return void aws("error", "right");
let resp = await client.pass(data.server, "getCategories", data); let resp = await client.pass(data.server, "addCategory", data);
aws(resp.state, resp.data); aws(resp.state, resp.data);
return; return;
} }
@ -229,3 +229,4 @@ export const getProducts: Act = {
aws("ok", out.filter(d => d != null)); aws("ok", out.filter(d => d != null));
} }
}; };