fix: 允许新增空文件

This commit is contained in:
shizhendong
2024-11-04 17:39:03 +08:00
parent bc26bcabd4
commit e210cb7cd0

View File

@@ -152,10 +152,10 @@ public class GitController {
if (T.StrUtil.hasEmpty(action, path)) {
return R.error(RCode.PARAM_CANNOT_EMPTY);
}
if (T.StrUtil.equalsAny(action, "create", "update")) {
String content = T.MapUtil.getStr(file, "content");
T.VerifyUtil.is(content).notEmpty(RCode.PARAM_CANNOT_EMPTY);
}
// if (T.StrUtil.equalsAny(action, "create", "update")) {
// String content = T.MapUtil.getStr(file, "content");
// T.VerifyUtil.is(content).notEmpty(RCode.PARAM_CANNOT_EMPTY);
// }
}
gitService.updateApplication(workspaceId, branchName, lastCommitId, message, files);
return R.ok();