fix 服务端脚本触发器、节点脚本触发器提示找不到用户

This commit is contained in:
bwcx_jzy 2024-01-05 15:09:41 +08:00
parent f6430e2c49
commit 6597955fa3
No known key found for this signature in database
GPG Key ID: E187D6E9DDDE8C53
3 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@
1. 【all】优化 日志记录器提升日志记录性能
2. 【server】优化 取消/停止构建采用异常来打断子进程
3. 【server】修复 本地构建无法取消
4. 【server】修复 服务端脚本触发器、节点脚本触发器提示找不到用户(感谢@LYY
------

View File

@ -83,7 +83,7 @@ public class NodeScriptTriggerApiController extends BaseJpomController {
*/
@RequestMapping(value = ServerOpenApi.NODE_SCRIPT_TRIGGER_URL, produces = MediaType.APPLICATION_JSON_VALUE)
public IJsonMessage<JSONObject> trigger2(@PathVariable String id, @PathVariable String token, HttpServletRequest request) {
NodeScriptCacheModel item = nodeScriptServer.getByKey(id, request);
NodeScriptCacheModel item = nodeScriptServer.getByKey(id);
Assert.notNull(item, "没有对应数据");
Assert.state(StrUtil.equals(token, item.getTriggerToken()), "触发token错误,或者已经失效");
//

View File

@ -85,7 +85,7 @@ public class ServerScriptTriggerApiController extends BaseJpomController {
*/
@RequestMapping(value = ServerOpenApi.SERVER_SCRIPT_TRIGGER_URL, produces = MediaType.APPLICATION_JSON_VALUE)
public IJsonMessage<JSONObject> trigger2(@PathVariable String id, @PathVariable String token, HttpServletRequest request) {
ScriptModel item = scriptServer.getByKey(id, request);
ScriptModel item = scriptServer.getByKey(id);
Assert.notNull(item, "没有对应数据");
Assert.state(StrUtil.equals(token, item.getTriggerToken()), "触发token错误,或者已经失效");
//