fix: Reverted to f0c2dfa

This commit is contained in:
Aditya
2025-03-17 18:24:56 +05:30
parent b6512897e8
commit c5a0ff5000
13 changed files with 259 additions and 120 deletions
+6 -2
View File
@@ -1032,10 +1032,14 @@ func deleteWorkflow(resp http.ResponseWriter, request *http.Request) {
log.Printf("[INFO] Should have deleted workflow %s (%s)", workflow.Name, fileId)
cacheKey := fmt.Sprintf("%s_workflows", user.Id)
shuffle.DeleteCache(ctx, cacheKey)
shuffle.DeleteCache(ctx, fmt.Sprintf("%s_workflows", user.Id))
shuffle.DeleteCache(ctx, fmt.Sprintf("%s_workflows", user.ActiveOrg.Id))
shuffle.DeleteCache(ctx, fmt.Sprintf("%s_%s", user.Username, fileId))
log.Printf("[DEBUG] Cleared workflow cache for %s (%s)", user.Username, user.Id)
shuffle.DeleteCache(ctx, fmt.Sprintf("workflow_%s_childworkflows", workflow.ID))
if len(workflow.ParentWorkflowId) > 0 {
shuffle.DeleteCache(ctx, fmt.Sprintf("workflow_%s_childworkflows", workflow.ParentWorkflowId))
}
resp.WriteHeader(200)
resp.Write([]byte(`{"success": true}`))