diff --git a/src/api/acts/admin.ts b/src/api/acts/admin.ts index 53afaab..1f4cd7c 100644 --- a/src/api/acts/admin.ts +++ b/src/api/acts/admin.ts @@ -17,6 +17,7 @@ export const getAccounts: Act = { accounts.name, accounts.viewable, accounts.deleted, + accounts.deletedTime, accounts.maxRooms, accounts.maxRoomSize, accounts.maxUsersPerRoom @@ -28,11 +29,12 @@ export const getAccounts: Act = { let name = d[accounts.name]; let viewable = d[accounts.viewable] ? true : false; let deleted = d[accounts.deleted] ? true : false; + let deletedTime = Number(d[accounts.deletedTime]); let maxRooms = d[accounts.maxRooms]; let maxRoomSize = d[accounts.maxRoomSize]; let maxUsersPerRoom = d[accounts.maxUsersPerRoom]; - if (accID != null && rights != null && name != null && viewable != null && deleted != null && maxRooms != null && maxRoomSize != null && maxUsersPerRoom != null) { - return { accID, rights, name, viewable, deleted, maxRooms, maxRoomSize, maxUsersPerRoom }; + if (accID != null && rights != null && name != null && viewable != null && deleted != null && maxRooms != null && maxRoomSize != null && maxUsersPerRoom != null && deletedTime != null) { + return { accID, rights, name, viewable, deleted, deletedTime, maxRooms, maxRoomSize, maxUsersPerRoom }; } return null; }); @@ -150,7 +152,7 @@ export const addOTA: Act = { // or change it, primary key is the token let resp = await insert(signupOTA.token, signupOTA.expires, signupOTA.usesLeft) .add(data.token, data.expires, data.usesLeft) .query(db); - if(resp.affectedRows == 0) throw new Error("insertion fail"); + if (resp.affectedRows == 0) throw new Error("insertion fail"); } catch (error) { await update(signupOTA) .set(signupOTA.expires, data.expires)