This commit is contained in:
苏文雄 2019-08-01 11:49:24 +08:00
commit 1edee0192c
2 changed files with 6 additions and 0 deletions

View File

@ -65,6 +65,7 @@ YApi 是<strong>高效</strong>、<strong>易用</strong>、<strong>功能强大
* [使用 alpine 版 docker 镜像快速部署 yapi](https://www.jianshu.com/p/a97d2efb23c5)
* [docker-yapi](https://github.com/Ryan-Miao/docker-yapi)
* [docker-compose一键部署yapi](https://github.com/jinfeijie/yapi)
* [docker-YApi: 更易用的 YApi 镜像](https://github.com/fjc0k/docker-YApi)
### YApi 一些工具
* [mysql服务http工具,可配合做自动化测试](https://github.com/hellosean1025/http-mysql-server)

View File

@ -22,6 +22,11 @@ class syncController extends baseController {
if (!projectId) {
return (ctx.body = yapi.commons.resReturn(null, 408, '缺少项目Id'));
}
if ((await this.checkAuth(projectId, 'project', 'edit')) !== true) {
return (ctx.body = yapi.commons.resReturn(null, 405, '没有权限'));
}
let result;
if (requestBody.id) {
result = await this.syncModel.up(requestBody);