mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 02:27:39 +00:00
fix: update many query
This commit is contained in:
@@ -373,8 +373,12 @@ export const renameWorkspaceEnvironment = async (req: Request, res: Response) =>
|
|||||||
{ environment: environmentSlug }
|
{ environment: environmentSlug }
|
||||||
);
|
);
|
||||||
await ServiceTokenData.updateMany(
|
await ServiceTokenData.updateMany(
|
||||||
{ workspace: workspaceId, environment: oldEnvironmentSlug },
|
{
|
||||||
{ environment: environmentSlug }
|
workspace: workspaceId,
|
||||||
|
"scopes.environment": oldEnvironmentSlug
|
||||||
|
},
|
||||||
|
{ $set: { "scopes.$[element].environment": environmentSlug } },
|
||||||
|
{ arrayFilters: [{ "element.environment": oldEnvironmentSlug }] }
|
||||||
);
|
);
|
||||||
await Integration.updateMany(
|
await Integration.updateMany(
|
||||||
{ workspace: workspaceId, environment: oldEnvironmentSlug },
|
{ workspace: workspaceId, environment: oldEnvironmentSlug },
|
||||||
|
|||||||
Reference in New Issue
Block a user