added missing acts

This commit is contained in:
jusax23 2023-03-22 17:59:36 +01:00
parent a717f40a23
commit bd83abba30
Signed by: jusax23
GPG key ID: 499E2AA870C1CD41
5 changed files with 25 additions and 22 deletions

View file

@ -3,9 +3,9 @@ import { PERMISSIONS } from "../../server/permissions.js";
import { sha256 } from "../../sys/crypto.js";
import { accounts, db, signupOTA } from "../../sys/db.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,
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.SHOW_USERS_AND_LISTS,
data: {},
@ -39,7 +39,7 @@ export const getAccounts = {
}
};
export const setPermissions = {
export const setPermissions: Act = {
state: STATE.client,
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.EDIT_RIGHTS,
data: {
@ -60,7 +60,7 @@ export const setPermissions = {
}
};
export const resetPassword = {
export const resetPassword: Act = {
state: STATE.client,
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.EDIT_USERS,
data: {
@ -83,7 +83,7 @@ export const resetPassword = {
}
};
export const setMaxValues = {
export const setMaxValues: Act = {
state: STATE.client,
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.EDIT_USERS,
data: {
@ -108,7 +108,7 @@ export const setMaxValues = {
}
};
export const getOTAs = {
export const getOTAs: Act = {
state: STATE.client,
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.MANAGE_OTA_TOKENS,
data: {},
@ -133,7 +133,7 @@ export const getOTAs = {
}
}
export const addOTA = {
export const addOTA: Act = {
state: STATE.client,
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.MANAGE_OTA_TOKENS,
data: {
@ -156,7 +156,7 @@ export const addOTA = {
aws("ok", "");
}
}
export const deleteOTA = {
export const deleteOTA: Act = {
state: STATE.client,
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.MANAGE_OTA_TOKENS,
data: {

View file

@ -5,11 +5,11 @@ import { accounts, db, roomMembers, rooms } from "../../sys/db.js";
import { selfTag } from "../../sys/selfTag.js";
import { getSettings, SETTINGS } from "../../sys/settings.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"
export const deleteAccount = {
export const deleteAccount: Act = {
state: STATE.client,
right: 0,
data: {},
@ -23,7 +23,7 @@ export const deleteAccount = {
}
};
export const createSignature = {
export const createSignature: Act = {
state: STATE.client,
right: PERMISSIONS.CAN_USE_API | PERMISSIONS.PROVIDE_CERT,
data: {
@ -37,7 +37,7 @@ export const createSignature = {
}
};
export const getMyAccount = {
export const getMyAccount: Act = {
state: STATE.client,
right: 0,
data: {},
@ -69,7 +69,7 @@ export const getMyAccount = {
}
};
export const changePassword = {
export const changePassword: Act = {
state: STATE.client,
right: PERMISSIONS.CAN_USE_API,
data: {
@ -91,7 +91,7 @@ export const changePassword = {
}
};
export const createRoom = {
export const createRoom: Act = {
state: STATE.client,
right: PERMISSIONS.CAN_USE_API,
data: {
@ -136,7 +136,7 @@ export const createRoom = {
}
};
export const deleteRoom = {
export const deleteRoom: Act = {
state: STATE.client,
right: PERMISSIONS.CAN_USE_API,
data: {
@ -157,7 +157,7 @@ export const deleteRoom = {
}
};
export const listPublicRooms = {
export const listPublicRooms: Act = {
state: STATE.client,
right: PERMISSIONS.CAN_USE_API,
data: {},

View file

@ -72,7 +72,7 @@ export const signup: Act = {
}
};
export const signupOTA = {
export const signupOTA: Act = {
state: STATE.no,
right: 0,
data: {
@ -119,7 +119,7 @@ export const signupOTA = {
}
};
export const signin = {
export const signin: Act = {
state: STATE.no,
right: 0,
data: {
@ -154,7 +154,7 @@ export const signin = {
}
};
export const remote1 = {
export const remote1: Act = {
state: STATE.no,
right: 0,
data: {
@ -187,7 +187,7 @@ export const remote1 = {
}
};
export const remote2 = {
export const remote2: Act = {
state: STATE.remoteP,
right: 0,
data: {
@ -204,7 +204,7 @@ export const remote2 = {
}
};
export const remoteServer1 = {
export const remoteServer1: Act = {
state: STATE.no,
right: 0,
data: {
@ -231,7 +231,7 @@ export const remoteServer1 = {
}
};
export const remoteServer2 = {
export const remoteServer2: Act = {
state: STATE.serverP,
right: 0,
data: {

View file

@ -0,0 +1,3 @@

View file