1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

fixing isArray dependency fixes #406

This commit is contained in:
Patrik J. Braun 2022-01-15 14:39:30 +01:00
parent 0efa75a0e1
commit 68e0cdd6f5
2 changed files with 2 additions and 3 deletions

View File

@ -155,6 +155,6 @@
"mysql": "2.18.1" "mysql": "2.18.1"
}, },
"engines": { "engines": {
"node": ">=14.0 <15.0" "node": ">=14.14 <15.0"
} }
} }

View File

@ -22,7 +22,6 @@ import {DatabaseType, ServerDataBaseConfig, SQLLogLevel} from '../../../../commo
import {AlbumBaseEntity} from './enitites/album/AlbumBaseEntity'; import {AlbumBaseEntity} from './enitites/album/AlbumBaseEntity';
import {SavedSearchEntity} from './enitites/album/SavedSearchEntity'; import {SavedSearchEntity} from './enitites/album/SavedSearchEntity';
import {NotificationManager} from '../../NotifocationManager'; import {NotificationManager} from '../../NotifocationManager';
import {isArray} from '../../../../../node_modules/ngx-bootstrap/chronos';
const LOG_TAG = '[SQLConnection]'; const LOG_TAG = '[SQLConnection]';
@ -99,7 +98,7 @@ export class SQLConnection {
// Adding enforced users to the db // Adding enforced users to the db
const userRepository = connection.getRepository(UserEntity); const userRepository = connection.getRepository(UserEntity);
if (isArray(Config.Server.Database.enforcedUsers) && if (Array.isArray(Config.Server.Database.enforcedUsers) &&
Config.Server.Database.enforcedUsers.length > 0) { Config.Server.Database.enforcedUsers.length > 0) {
for (const uc of Config.Server.Database.enforcedUsers) { for (const uc of Config.Server.Database.enforcedUsers) {
const user = await userRepository.findOne({name: uc.name}); const user = await userRepository.findOne({name: uc.name});