增加 CommonResult 的 check 逻辑

This commit is contained in:
YunaiV
2022-06-17 23:54:42 +08:00
parent ff18d2f30a
commit ca28d791aa
38 changed files with 221 additions and 699 deletions

View File

@@ -50,9 +50,7 @@ public interface FileApi {
default String createFile(@RequestParam("name") String name,
@RequestParam("path") String path,
@RequestParam("content") byte[] content) {
CommonResult<String> result = createFile(new FileCreateReqDTO().setName(name).setPath(path).setContent(content));
result.checkError();
return result.getData();
return createFile(new FileCreateReqDTO().setName(name).setPath(path).setContent(content)).getCheckedData();
}
@PostMapping(PREFIX + "/create")