From 6e07aa877fad2b8a2aa8c010eda4ea4fa81d1383 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 1 Oct 2024 22:17:11 -0400 Subject: [PATCH] clear secret --- server/scripts/20240930113921-hash-api-keys.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/scripts/20240930113921-hash-api-keys.ts b/server/scripts/20240930113921-hash-api-keys.ts index 693cb1303c..c361d422ce 100644 --- a/server/scripts/20240930113921-hash-api-keys.ts +++ b/server/scripts/20240930113921-hash-api-keys.ts @@ -25,6 +25,8 @@ export default async function main(exit = false, limit = 100) { console.log(`Migrating ${apiKey.id}…`); apiKey.value = apiKey.secret; apiKey.hash = ApiKey.hash(apiKey.secret); + // @ts-expect-error secret is deprecated + apiKey.secret = null; await apiKey.save({ transaction }); } } catch (err) {