added missing acts
This commit is contained in:
parent
a717f40a23
commit
bd83abba30
5 changed files with 25 additions and 22 deletions
|
@ -3,9 +3,9 @@ import { PERMISSIONS } from "../../server/permissions.js";
|
||||||
import { sha256 } from "../../sys/crypto.js";
|
import { sha256 } from "../../sys/crypto.js";
|
||||||
import { accounts, db, signupOTA } from "../../sys/db.js";
|
import { accounts, db, signupOTA } from "../../sys/db.js";
|
||||||
import { get64, uts } from "../../sys/tools.js";
|
import { get64, uts } from "../../sys/tools.js";
|
||||||
import { Client, STATE } from "../user.js";
|
import { Act, Client, STATE } from "../user.js";
|
||||||
|
|
||||||
export const getAccounts = {
|
export const getAccounts: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.SHOW_USERS_AND_LISTS,
|
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.SHOW_USERS_AND_LISTS,
|
||||||
data: {},
|
data: {},
|
||||||
|
@ -39,7 +39,7 @@ export const getAccounts = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const setPermissions = {
|
export const setPermissions: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.EDIT_RIGHTS,
|
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.EDIT_RIGHTS,
|
||||||
data: {
|
data: {
|
||||||
|
@ -60,7 +60,7 @@ export const setPermissions = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const resetPassword = {
|
export const resetPassword: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.EDIT_USERS,
|
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.EDIT_USERS,
|
||||||
data: {
|
data: {
|
||||||
|
@ -83,7 +83,7 @@ export const resetPassword = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const setMaxValues = {
|
export const setMaxValues: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.EDIT_USERS,
|
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.EDIT_USERS,
|
||||||
data: {
|
data: {
|
||||||
|
@ -108,7 +108,7 @@ export const setMaxValues = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getOTAs = {
|
export const getOTAs: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.MANAGE_OTA_TOKENS,
|
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.MANAGE_OTA_TOKENS,
|
||||||
data: {},
|
data: {},
|
||||||
|
@ -133,7 +133,7 @@ export const getOTAs = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const addOTA = {
|
export const addOTA: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.MANAGE_OTA_TOKENS,
|
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.MANAGE_OTA_TOKENS,
|
||||||
data: {
|
data: {
|
||||||
|
@ -156,7 +156,7 @@ export const addOTA = {
|
||||||
aws("ok", "");
|
aws("ok", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export const deleteOTA = {
|
export const deleteOTA: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.MANAGE_OTA_TOKENS,
|
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.MANAGE_OTA_TOKENS,
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -5,11 +5,11 @@ import { accounts, db, roomMembers, rooms } from "../../sys/db.js";
|
||||||
import { selfTag } from "../../sys/selfTag.js";
|
import { selfTag } from "../../sys/selfTag.js";
|
||||||
import { getSettings, SETTINGS } from "../../sys/settings.js";
|
import { getSettings, SETTINGS } from "../../sys/settings.js";
|
||||||
import { get64 } from "../../sys/tools.js";
|
import { get64 } from "../../sys/tools.js";
|
||||||
import { Client, STATE } from "../user.js";
|
import { Act, Client, STATE } from "../user.js";
|
||||||
import { canCreateRoom } from "../helper.js"
|
import { canCreateRoom } from "../helper.js"
|
||||||
|
|
||||||
|
|
||||||
export const deleteAccount = {
|
export const deleteAccount: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: 0,
|
right: 0,
|
||||||
data: {},
|
data: {},
|
||||||
|
@ -23,7 +23,7 @@ export const deleteAccount = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const createSignature = {
|
export const createSignature: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.PROVIDE_CERT,
|
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.PROVIDE_CERT,
|
||||||
data: {
|
data: {
|
||||||
|
@ -37,7 +37,7 @@ export const createSignature = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getMyAccount = {
|
export const getMyAccount: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: 0,
|
right: 0,
|
||||||
data: {},
|
data: {},
|
||||||
|
@ -69,7 +69,7 @@ export const getMyAccount = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const changePassword = {
|
export const changePassword: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: PERMISSIONS.CAN_USE_API,
|
right: PERMISSIONS.CAN_USE_API,
|
||||||
data: {
|
data: {
|
||||||
|
@ -91,7 +91,7 @@ export const changePassword = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const createRoom = {
|
export const createRoom: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: PERMISSIONS.CAN_USE_API,
|
right: PERMISSIONS.CAN_USE_API,
|
||||||
data: {
|
data: {
|
||||||
|
@ -136,7 +136,7 @@ export const createRoom = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const deleteRoom = {
|
export const deleteRoom: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: PERMISSIONS.CAN_USE_API,
|
right: PERMISSIONS.CAN_USE_API,
|
||||||
data: {
|
data: {
|
||||||
|
@ -157,7 +157,7 @@ export const deleteRoom = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const listPublicRooms = {
|
export const listPublicRooms: Act = {
|
||||||
state: STATE.client,
|
state: STATE.client,
|
||||||
right: PERMISSIONS.CAN_USE_API,
|
right: PERMISSIONS.CAN_USE_API,
|
||||||
data: {},
|
data: {},
|
||||||
|
|
|
@ -72,7 +72,7 @@ export const signup: Act = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const signupOTA = {
|
export const signupOTA: Act = {
|
||||||
state: STATE.no,
|
state: STATE.no,
|
||||||
right: 0,
|
right: 0,
|
||||||
data: {
|
data: {
|
||||||
|
@ -119,7 +119,7 @@ export const signupOTA = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const signin = {
|
export const signin: Act = {
|
||||||
state: STATE.no,
|
state: STATE.no,
|
||||||
right: 0,
|
right: 0,
|
||||||
data: {
|
data: {
|
||||||
|
@ -154,7 +154,7 @@ export const signin = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const remote1 = {
|
export const remote1: Act = {
|
||||||
state: STATE.no,
|
state: STATE.no,
|
||||||
right: 0,
|
right: 0,
|
||||||
data: {
|
data: {
|
||||||
|
@ -187,7 +187,7 @@ export const remote1 = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const remote2 = {
|
export const remote2: Act = {
|
||||||
state: STATE.remoteP,
|
state: STATE.remoteP,
|
||||||
right: 0,
|
right: 0,
|
||||||
data: {
|
data: {
|
||||||
|
@ -204,7 +204,7 @@ export const remote2 = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const remoteServer1 = {
|
export const remoteServer1: Act = {
|
||||||
state: STATE.no,
|
state: STATE.no,
|
||||||
right: 0,
|
right: 0,
|
||||||
data: {
|
data: {
|
||||||
|
@ -231,7 +231,7 @@ export const remoteServer1 = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const remoteServer2 = {
|
export const remoteServer2: Act = {
|
||||||
state: STATE.serverP,
|
state: STATE.serverP,
|
||||||
right: 0,
|
right: 0,
|
||||||
data: {
|
data: {
|
||||||
|
|
3
src/api/acts/roomContent.ts
Normal file
3
src/api/acts/roomContent.ts
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue