Add readonly todo and archive providers and retire legacy writes

This commit is contained in:
abaishu0730 committed 2026-10-19 12:43:03 +08:00
1 parent 37b4a156c9
commit 5c7ce76f5d
12 files changed
+187 -25

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ function workspaceApi({workspace,store,user,route,method,body,reply,bpmSessions}
const action=/^\/api\/exceptions\/([\w-]+)\/action$/.exec(route);if(action){reply(200,workspace.actOnException(action[1],body,user,members()));return true;}
if(route==='/api/connections'){reply(201,workspace.createConnection(body,user,members()));return true;}
const disable=/^\/api\/connections\/([\w-]+)\/disable$/.exec(route);if(disable){if(Object.keys(body).length)throw Object.assign(new Error('停用连接不接受额外数据。'),{status:400});reply(200,workspace.disableConnection(disable[1],user));return true;}
if(route==='/api/supervisor'){reply(200,workspace.saveSupervisor(body,user,members()));return true;}
if(route==='/api/supervisor')throw Object.assign(new Error('监管草稿已停用,请在系统健康和异常待办中查看实际运行结果。'),{status:410});
return false;
}
module.exports={workspaceApi};