MCPcopy Create free account
hub / github.com/ShipSecAI/studio / delete

Method delete

backend/src/schedules/schedules.service.ts:194–208  ·  view source on GitHub ↗
(auth: AuthContext | null, id: string)

Source from the content-addressed store, hash-verified

192 }
193
194 async delete(auth: AuthContext | null, id: string): Promise<void> {
195 const existing = await this.findOwnedScheduleOrThrow(id, auth);
196 await this.workflowsService.ensureWorkflowAdminAccess(existing.workflowId, auth);
197 const temporalScheduleId = existing.temporalScheduleId ?? existing.id;
198 if (temporalScheduleId) {
199 await this.temporalService.deleteSchedule(temporalScheduleId).catch((error) => {
200 this.logger.warn(
201 `Failed to delete Temporal schedule ${temporalScheduleId}: ${
202 error instanceof Error ? error.message : String(error)
203 }`,
204 );
205 });
206 }
207 await this.repository.delete(existing.id, { organizationId: existing.organizationId });
208 }
209
210 async pause(auth: AuthContext | null, id: string): Promise<WorkflowSchedule> {
211 const existing = await this.findOwnedScheduleOrThrow(id, auth);

Callers 1

createMethod · 0.45

Calls 4

warnMethod · 0.80
deleteScheduleMethod · 0.45

Tested by

no test coverage detected