You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// NOTE: this function is called by the task handlerstaticasyncdeleteDeployment({ cameraId, deploymentId }: gql.DeleteDeploymentInput,context: Context,): Promise<HydratedCameraConfig>{Commenttry{const{ project, camConfig }=awaitretry(async()=>{// find camera configconst[project]=awaitProjectModel.getProjects({_ids: [context.user['curr_project']!]},context,);constcamConfig=project.cameraConfigs.find((cc)=>idMatch(cc._id,cameraId))!;// filter out deployment, sort remaining ones, and save projectcamConfig.deployments=sortDeps(camConfig!.deployments.filter((dep)=>!idMatch(dep._id!,deploymentId),)astypeofcamConfig.deployments,);awaitproject.save();return{ project, camConfig };// TODO: do we need to return the project and cam config here??},{retries: 2},);// TODO: we need to reverse the above operation if reMapImagesToDeps fails!awaitProjectModel.reMapImagesToDeps({projId: project._id, camConfig });returncamConfig;}catch(err){if(errinstanceofGraphQLError)throwerr;thrownewInternalServerError(errasstring);}}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: