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) {