Fix error in createInitialUser function => check for users not superusers

This commit is contained in:
AbegaM
2024-03-07 16:31:28 +03:00
parent ff632facd3
commit 45534e7317
2 changed files with 8 additions and 8 deletions

View File

@@ -443,13 +443,13 @@ const createInitialUser = async () => {
try {
// check if there is a superuser in the DB
const superusers = rowService.get({
const users = rowService.get({
tableName: '_users',
whereString: 'WHERE is_superuser=?',
whereStringValues: ['true'],
whereString: '',
whereStringValues: [],
});
if (superusers.length <= 0) {
if (users.length <= 0) {
// check if initial superuser username is passed from the env or CLI
if (!username) {
console.error(

View File

@@ -540,8 +540,8 @@
"description": "",
"parameters": [],
"responses": {
"201": {
"description": "Created"
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
@@ -576,8 +576,8 @@
}
],
"responses": {
"201": {
"description": "Created"
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"