This commit is contained in:
jmxd
2025-05-02 08:42:07 +08:00
parent 305a4fb508
commit 030d0c186e
2 changed files with 3 additions and 3 deletions

View File

@@ -142,7 +142,7 @@ public class MagicResourceController extends MagicController implements MagicExc
return new JsonBean<>(service.unlock(id));
}
@GetMapping("/resource")
@PostMapping("/resource")
@ResponseBody
public JsonBean<Map<String, TreeNode<Attributes<Object>>>> resources(MagicHttpServletRequest request) {
Map<String, TreeNode<Group>> tree = service.tree();
@@ -180,7 +180,7 @@ public class MagicResourceController extends MagicController implements MagicExc
.stream()
.filter(it -> allowVisit(request, Authorization.VIEW, it))
.map(MagicEntity::simple)
.map((Function<MagicEntity, TreeNode<Attributes<Object>>>) TreeNode::new)
.map((Function<MagicEntity, TreeNode>) TreeNode::new)
.forEach(value::addChild);
}
return value;

View File

@@ -203,7 +203,7 @@ public class MagicWorkbenchController extends MagicController implements MagicEx
return new JsonBean<>(true);
}
@GetMapping("/search")
@PostMapping("/search")
@ResponseBody
public JsonBean<List<Map<String, Object>>> search(String keyword, MagicHttpServletRequest request) {
if (StringUtils.isBlank(keyword)) {