fixes
This commit is contained in:
parent
1ab526b4d8
commit
37e3957130
2 changed files with 5 additions and 5 deletions
|
@ -13,7 +13,7 @@ export const getCategories: 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, "listCategories", data);
|
let resp = await client.pass(data.server, "getCategories", data);
|
||||||
aws(resp.state, resp.data);
|
aws(resp.state, resp.data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ export const getCategories: Act = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const changeCategories: Act = {
|
export const changeCategory: Act = {
|
||||||
state: STATE.client | STATE.remote,
|
state: STATE.client | STATE.remote,
|
||||||
right: 0,
|
right: 0,
|
||||||
data: {
|
data: {
|
||||||
|
@ -54,7 +54,7 @@ export const changeCategories: 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, "changeCategories", data);
|
let resp = await client.pass(data.server, "changeCategory", data);
|
||||||
aws(resp.state, resp.data);
|
aws(resp.state, resp.data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -434,7 +434,7 @@ export const kickMember: Act = {
|
||||||
server: "string",
|
server: "string",
|
||||||
},
|
},
|
||||||
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.roomServer)) {
|
||||||
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, "kickMember", data);
|
let resp = await client.pass(data.server, "kickMember", data);
|
||||||
aws(resp.state, resp.data);
|
aws(resp.state, resp.data);
|
||||||
|
@ -446,7 +446,7 @@ export const kickMember: Act = {
|
||||||
.where(and(
|
.where(and(
|
||||||
eq(roomMembers.roomID, roomID),
|
eq(roomMembers.roomID, roomID),
|
||||||
eq(roomMembers.name, data.name),
|
eq(roomMembers.name, data.name),
|
||||||
eq(roomMembers.server, data.server),
|
eq(roomMembers.server, checkSelfTag(data.server) ? "local" : data.server),
|
||||||
or(
|
or(
|
||||||
not(eq(roomMembers.server, "local")),
|
not(eq(roomMembers.server, "local")),
|
||||||
not(exists(
|
not(exists(
|
||||||
|
|
Loading…
Reference in a new issue