mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
docs: 合并文档
This commit is contained in:
commit
29b88210f1
16
doc/build/api.html
vendored
16
doc/build/api.html
vendored
@ -1154,7 +1154,11 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<<<<<<< HEAD
|
||||
<a href="./static/server/controllers/user.js.html#409" target="_blank">./server/controllers/user.js:409</a>
|
||||
=======
|
||||
<a href="./static/server/controllers/user.js.html#421" target="_blank">./server/controllers/user.js:421</a>
|
||||
>>>>>>> ed978f247360d97e9ea661db1aecc9bd54cd008c
|
||||
</p>
|
||||
|
||||
|
||||
@ -1531,7 +1535,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/project.js.html#142" target="_blank">./server/controllers/project.js:142</a>
|
||||
<a href="./static/server/controllers/project.js.html#144" target="_blank">./server/controllers/project.js:144</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -1609,7 +1613,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/project.js.html#182" target="_blank">./server/controllers/project.js:182</a>
|
||||
<a href="./static/server/controllers/project.js.html#185" target="_blank">./server/controllers/project.js:185</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -1692,7 +1696,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/project.js.html#206" target="_blank">./server/controllers/project.js:206</a>
|
||||
<a href="./static/server/controllers/project.js.html#209" target="_blank">./server/controllers/project.js:209</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -1811,7 +1815,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/project.js.html#244" target="_blank">./server/controllers/project.js:244</a>
|
||||
<a href="./static/server/controllers/project.js.html#247" target="_blank">./server/controllers/project.js:247</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -1883,7 +1887,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/project.js.html#277" target="_blank">./server/controllers/project.js:277</a>
|
||||
<a href="./static/server/controllers/project.js.html#280" target="_blank">./server/controllers/project.js:280</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -2043,7 +2047,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/project.js.html#338" target="_blank">./server/controllers/project.js:338</a>
|
||||
<a href="./static/server/controllers/project.js.html#341" target="_blank">./server/controllers/project.js:341</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
@ -166,6 +166,8 @@ class projectController extends baseController {
|
||||
ctx.body = yapi.commons.resReturn(null, 402, e.message)
|
||||
}
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/**
|
||||
* 获取项目成员列表
|
||||
@ -207,6 +209,7 @@ class projectController extends baseController {
|
||||
}
|
||||
|
||||
|
||||
>>>>>>> 2467556d35eca929c40a1ffd1e5d64d047a9fc77
|
||||
/**
|
||||
* 添加项目
|
||||
* @interface /project/get
|
||||
|
20
doc/build/static/server/controllers/user.js.html
vendored
20
doc/build/static/server/controllers/user.js.html
vendored
@ -406,11 +406,31 @@ class userController extends baseController {
|
||||
* @returns {Object}
|
||||
* @example
|
||||
*/
|
||||
<<<<<<< HEAD
|
||||
async update(ctx) { //更新用户信息
|
||||
try {
|
||||
var userInst = yapi.getInst(userModel);
|
||||
let id = this.getUid();
|
||||
let data = {
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
async update(ctx){ //更新用户信息
|
||||
try{
|
||||
let params = ctx.request.body;
|
||||
if(this.getRole() !== 'admin' && params.uid != this.getUid()){
|
||||
return ctx.body = yapi.commons.resReturn(null,401,'没有权限');
|
||||
}
|
||||
var userInst = yapi.getInst(userModel);
|
||||
let id = params.uid;
|
||||
let data ={
|
||||
=======
|
||||
async update(ctx) { //更新用户信息
|
||||
try {
|
||||
var userInst = yapi.getInst(userModel);
|
||||
let id = this.getUid();
|
||||
let data = {
|
||||
>>>>>>> 0eba4c285454eb4e4175c228d959f917a3685aac
|
||||
>>>>>>> ed978f247360d97e9ea661db1aecc9bd54cd008c
|
||||
up_time: yapi.commons.time()
|
||||
};
|
||||
if(this.getRole() === 'admin'){
|
||||
|
@ -179,7 +179,6 @@ class projectController extends baseController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加项目
|
||||
* @interface /project/get
|
||||
@ -278,7 +277,7 @@ class projectController extends baseController {
|
||||
/**
|
||||
* 编辑项目
|
||||
* @interface /project/up
|
||||
* @method GET
|
||||
* @method POST
|
||||
* @category project
|
||||
* @foldnumber 10
|
||||
* @param {Number} id 项目id,不能为空
|
||||
|
@ -381,9 +381,14 @@ class userController extends baseController {
|
||||
*/
|
||||
async update(ctx){ //更新用户信息
|
||||
try{
|
||||
let params = ctx.request.body;
|
||||
if(this.getRole() !== 'admin' && params.uid != this.getUid()){
|
||||
return ctx.body = yapi.commons.resReturn(null,401,'没有权限');
|
||||
}
|
||||
var userInst = yapi.getInst(userModel);
|
||||
let id = this.getUid();
|
||||
let id = params.uid;
|
||||
let data ={
|
||||
|
||||
up_time: yapi.commons.time()
|
||||
};
|
||||
if(this.getRole() === 'admin'){
|
||||
|
Loading…
Reference in New Issue
Block a user