fix backup await

This commit is contained in:
Julian Krauser 2025-02-02 16:37:55 +01:00
parent 6330ebd01d
commit 542a77fbef
3 changed files with 3 additions and 3 deletions

View file

@ -54,7 +54,7 @@ export async function createManualBackup(req: Request, res: Response): Promise<a
export async function restoreBackupByLocalFile(req: Request, res: Response): Promise<any> { export async function restoreBackupByLocalFile(req: Request, res: Response): Promise<any> {
let filename = req.body.filename; let filename = req.body.filename;
let partial = req.body.partial; let partial = req.body.partial;
let include = req.body.includes; let include = req.body.include;
await BackupHelper.loadBackup({ filename, include, partial }); await BackupHelper.loadBackup({ filename, include, partial });

View file

@ -120,7 +120,7 @@ export default abstract class BackupHelper {
throw new InternalException("partial and include have to be set correctly for restoring backup."); throw new InternalException("partial and include have to be set correctly for restoring backup.");
} }
dataSource.manager await dataSource.manager
.transaction(async (transaction) => { .transaction(async (transaction) => {
this.transactionManager = transaction; this.transactionManager = transaction;

View file

@ -7,7 +7,7 @@ import {
getGeneratedBackups, getGeneratedBackups,
restoreBackupByLocalFile, restoreBackupByLocalFile,
uploadBackupFile, uploadBackupFile,
} from "../../../controller/admin/club/backupController"; } from "../../../controller/admin/user/backupController";
const storage = multer.diskStorage({ const storage = multer.diskStorage({
destination: (req, file, cb) => { destination: (req, file, cb) => {