patch service token migration backwards with mongo

This commit is contained in:
Maidul Islam
2024-01-27 12:40:37 +05:30
committed by Akhil Mohan
parent 9677836b76
commit e28416b50b
6 changed files with 25 additions and 14 deletions
+1 -3
View File
@@ -1432,8 +1432,6 @@ const main = async () => {
postgresTableName: TableName.ServiceToken,
returnKeys: ["id"],
preProcessing: async (doc) => {
const id = uuidV4();
const projectKvRes = await projectKv
.get(doc.workspace.toString())
.catch(() => null);
@@ -1443,7 +1441,7 @@ const main = async () => {
if (!userId) return;
return {
id,
id: doc._id.toString(),
projectId: doc.workspace.toString(),
name: doc.name,
createdBy: userId,