From d3f9a64b9bb2499fd515b730ed3e751cc3a98e86 Mon Sep 17 00:00:00 2001 From: panda Date: Mon, 3 Jul 2023 00:34:50 +0800 Subject: [PATCH] core: fix storage check display (#603) --- packages/hydrooj/src/service/storage.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/hydrooj/src/service/storage.ts b/packages/hydrooj/src/service/storage.ts index e12d128f5..a57fc6eba 100644 --- a/packages/hydrooj/src/service/storage.ts +++ b/packages/hydrooj/src/service/storage.ts @@ -256,7 +256,7 @@ class RemoteStorageService { async status() { return { type: 'S3', - status: !!this.error, + status: !this.error, error: this.error, bucket: this.bucket, }; @@ -265,7 +265,7 @@ class RemoteStorageService { class LocalStorageService { client: null; - error: null; + error = ''; dir: string; opts: null; private replaceWithAlternativeUrlFor: Record<'user' | 'judge', (originalUrl: string) => string>; @@ -342,7 +342,7 @@ class LocalStorageService { async status() { return { type: 'Local', - status: !!this.error, + status: !this.error, error: this.error, bucket: 'Hydro', };