1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-06-15 00:05:28 +02:00

Project cleanup

This commit is contained in:
Patrik J. Braun
2021-01-04 10:32:19 +01:00
parent bd60900f7c
commit 2f0d2a5e59
15 changed files with 81 additions and 133 deletions

View File

@ -87,6 +87,8 @@ export class SQLConnection {
public static async init(): Promise<void> {
const connection = await this.getConnection();
// Add dummy Admin to the db
const userRepository = connection.getRepository(UserEntity);
const admins = await userRepository.find({role: UserRoles.Admin});
if (admins.length === 0) {