1
0
mirror of synced 2025-10-29 10:29:18 +00:00

link between servers & groups, clean, bug fix

This commit is contained in:
Valentin PUCCETTI
2023-09-11 16:28:18 +02:00
parent a034396dbe
commit 221a4b24a0
19 changed files with 298 additions and 76 deletions

View File

@@ -1,7 +1,6 @@
const User = require('../model/user.model')
const Key = require("../model/key.model");
const regexp = /^\S*$/;
const regexp_space = /^\S*$/;
async function userList(code) {
@@ -22,7 +21,7 @@ function makeAdmin(userId) {
async function delUser(id) {
User.findOne({where: { id: id}}).then((result) => {
if (result && regexp.test(id)) {
if (result && regexp_space.test(id)) {
result.destroy()
.then(() => {
console.log('user ' + id + ' deleted from database')