This commit is contained in:
jusax23 2023-03-24 21:09:25 +01:00
parent 1ab526b4d8
commit 37e3957130
Signed by: jusax23
GPG key ID: 499E2AA870C1CD41
2 changed files with 5 additions and 5 deletions

View file

@ -13,7 +13,7 @@ export const getCategories: Act = {
func: async (client: Client, data: any, aws: (code: string, data: any) => void) => {
if (!checkSelfTag(data.server)) {
if (client.state != STATE.client) return void aws("error", "right");
let resp = await client.pass(data.server, "listCategories", data);
let resp = await client.pass(data.server, "getCategories", data);
aws(resp.state, resp.data);
return;
}
@ -41,7 +41,7 @@ export const getCategories: Act = {
}
};
export const changeCategories: Act = {
export const changeCategory: Act = {
state: STATE.client | STATE.remote,
right: 0,
data: {
@ -54,7 +54,7 @@ export const changeCategories: Act = {
func: async (client: Client, data: any, aws: (code: string, data: any) => void) => {
if (!checkSelfTag(data.server)) {
if (client.state != STATE.client) return void aws("error", "right");
let resp = await client.pass(data.server, "changeCategories", data);
let resp = await client.pass(data.server, "changeCategory", data);
aws(resp.state, resp.data);
return;
}

View file

@ -434,7 +434,7 @@ export const kickMember: Act = {
server: "string",
},
func: async (client: Client, data: any, aws: (code: string, data: any) => void) => {
if (!checkSelfTag(data.server)) {
if (!checkSelfTag(data.roomServer)) {
if (client.state != STATE.client) return void aws("error", "right");
let resp = await client.pass(data.server, "kickMember", data);
aws(resp.state, resp.data);
@ -446,7 +446,7 @@ export const kickMember: Act = {
.where(and(
eq(roomMembers.roomID, roomID),
eq(roomMembers.name, data.name),
eq(roomMembers.server, data.server),
eq(roomMembers.server, checkSelfTag(data.server) ? "local" : data.server),
or(
not(eq(roomMembers.server, "local")),
not(exists(