Skip to content

Commit 5a816b1

Browse files
committed
✨ 增加 readme.md 兼容模式
1 parent 910406c commit 5a816b1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/main/java/im/zhaojun/zfile/admin/controller/stroage/StorageSourceController.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import im.zhaojun.zfile.home.model.request.UpdateStorageSortRequest;
1414
import io.swagger.annotations.Api;
1515
import io.swagger.annotations.ApiImplicitParam;
16+
import io.swagger.annotations.ApiImplicitParams;
1617
import io.swagger.annotations.ApiOperation;
1718
import org.springframework.web.bind.annotation.DeleteMapping;
1819
import org.springframework.web.bind.annotation.GetMapping;
@@ -131,4 +132,17 @@ public AjaxJson<Boolean> existKey(String storageKey) {
131132
return AjaxJson.getSuccessData(exist);
132133
}
133134

135+
@ApiOperationSupport(order = 9)
136+
@ApiOperation(value = "修改 readme 兼容模式", notes = "修改 readme 兼容模式是否启用")
137+
@ApiImplicitParams({
138+
@ApiImplicitParam(paramType = "path", name = "storageId", value = "存储源 id", required = true),
139+
@ApiImplicitParam(paramType = "path", name = "status", value = "存储源兼容模式状态", required = true)
140+
})
141+
@PostMapping("/storage/{storageId}/compatibility_readme/{status}")
142+
public AjaxJson<Void> changeCompatibilityReadme(@PathVariable Integer storageId, @PathVariable Boolean status) {
143+
StorageSource storageSource = storageSourceService.findById(storageId);
144+
storageSource.setCompatibilityReadme(status);
145+
storageSourceService.updateById(storageSource);
146+
return AjaxJson.getSuccess();
147+
}
134148
}

0 commit comments

Comments
 (0)