From 0cfdd5a61ba0de7a988a1dece343133f9aba126f Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Tue, 28 Jan 2025 15:01:01 -0500 Subject: [PATCH] fix: backup restore formatting --- api/src/utils.ts | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/api/src/utils.ts b/api/src/utils.ts index ff9c32402..9d834cb4f 100644 --- a/api/src/utils.ts +++ b/api/src/utils.ts @@ -1,6 +1,7 @@ import { BadRequestException, ExecutionContext, Logger, UnauthorizedException } from '@nestjs/common'; import { GqlExecutionContext } from '@nestjs/graphql'; -import { copyFile, unlink } from 'node:fs/promises'; +import { access, constants, copyFile, unlink } from 'node:fs/promises'; +import { dirname } from 'node:path'; import strftime from 'strftime'; @@ -245,9 +246,6 @@ export function handleAuthError( throw new UnauthorizedException(`${operation}: ${errorMessage}`); } -import { access, constants } from 'node:fs/promises'; -import { dirname } from 'node:path'; - /** * Helper method to allow backing up a single file to a .bak file. * @param path the file to backup, creates a .bak file in the same directory @@ -259,13 +257,13 @@ export const backupFile = async (path: string, throwOnMissing = true): Promise