tildefriends/apps/cory/admin/app.js

14 lines
374 B
JavaScript

import * as tfrpc from '/tfrpc.js';
tfrpc.register(function delete_user(user) {
return core.deleteUser(user);
});
async function main() {
let data = {users: {}};
for (let user of await core.users()) {
data.users[user] = await core.permissionsForUser(user);
}
await app.setDocument(utf8Decode(getFile('index.html')).replace('$data', JSON.stringify(data)));
}
main();