mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-18 13:04:46 +08:00
fix: 完善log、follow接口注释
This commit is contained in:
parent
2b2eba4915
commit
8054a95cd5
@ -23,16 +23,16 @@ class followController extends baseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取节点列表
|
* 获取关注项目列表
|
||||||
* @interface /node/list
|
* @interface /follow/list
|
||||||
* @method GET
|
* @method GET
|
||||||
* @category node
|
* @category follow
|
||||||
* @foldnumber 10
|
* @foldnumber 10
|
||||||
* @param {Number} uid 用户id, 不能为空
|
* @param {Number} uid 用户id, 不能为空
|
||||||
* @param {Number} [page] 分页页码
|
* @param {Number} [page] 分页页码
|
||||||
* @param {Number} [limit] 分页大小
|
* @param {Number} [limit] 分页大小
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
* @example ./api/follow/list.json
|
* @example /follow/list
|
||||||
*/
|
*/
|
||||||
|
|
||||||
async list(ctx) {
|
async list(ctx) {
|
||||||
@ -57,6 +57,18 @@ class followController extends baseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消关注
|
||||||
|
* @interface /follow/list
|
||||||
|
* @method POST
|
||||||
|
* @category follow
|
||||||
|
* @foldnumber 10
|
||||||
|
* @param {Number} id 关注id
|
||||||
|
* @returns {Object}
|
||||||
|
* @example /follow/del
|
||||||
|
*/
|
||||||
|
|
||||||
async del(ctx) {
|
async del(ctx) {
|
||||||
let params = ctx.request.body;
|
let params = ctx.request.body;
|
||||||
|
|
||||||
@ -72,6 +84,20 @@ class followController extends baseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加关注
|
||||||
|
* @interface /follow/list
|
||||||
|
* @method POST
|
||||||
|
* @category follow
|
||||||
|
* @foldnumber 10
|
||||||
|
* @param {Number} uid 用户id
|
||||||
|
* @param {Number} projectid 项目id
|
||||||
|
* @param {String} projectname 项目名
|
||||||
|
* @param {String} icon 项目icon
|
||||||
|
* @returns {Object}
|
||||||
|
* @example /follow/add
|
||||||
|
*/
|
||||||
|
|
||||||
async add(ctx) {
|
async add(ctx) {
|
||||||
let params = ctx.request.body;
|
let params = ctx.request.body;
|
||||||
params = yapi.commons.handleParams(params, {
|
params = yapi.commons.handleParams(params, {
|
||||||
|
@ -27,16 +27,16 @@ class logController extends baseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取节点列表
|
* 获取动态列表
|
||||||
* @interface /node/list
|
* @interface /log/list
|
||||||
* @method GET
|
* @method GET
|
||||||
* @category node
|
* @category log
|
||||||
* @foldnumber 10
|
* @foldnumber 10
|
||||||
* @param {Number} uid 用户id, 不能为空
|
* @param {Number} uid 用户id, 不能为空
|
||||||
* @param {Number} [page] 分页页码
|
* @param {Number} [page] 分页页码
|
||||||
* @param {Number} [limit] 分页大小
|
* @param {Number} [limit] 分页大小
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
* @example ./api/project/list.json
|
* @example /log/list
|
||||||
*/
|
*/
|
||||||
|
|
||||||
async list(ctx) {
|
async list(ctx) {
|
||||||
|
@ -69,16 +69,16 @@ var followController = function (_baseController) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取节点列表
|
* 获取关注项目列表
|
||||||
* @interface /node/list
|
* @interface /follow/list
|
||||||
* @method GET
|
* @method GET
|
||||||
* @category node
|
* @category follow
|
||||||
* @foldnumber 10
|
* @foldnumber 10
|
||||||
* @param {Number} uid 用户id, 不能为空
|
* @param {Number} uid 用户id, 不能为空
|
||||||
* @param {Number} [page] 分页页码
|
* @param {Number} [page] 分页页码
|
||||||
* @param {Number} [limit] 分页大小
|
* @param {Number} [limit] 分页大小
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
* @example ./api/follow/list.json
|
* @example /follow/list
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(0, _createClass3.default)(followController, [{
|
(0, _createClass3.default)(followController, [{
|
||||||
@ -140,6 +140,18 @@ var followController = function (_baseController) {
|
|||||||
|
|
||||||
return list;
|
return list;
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消关注
|
||||||
|
* @interface /follow/list
|
||||||
|
* @method POST
|
||||||
|
* @category follow
|
||||||
|
* @foldnumber 10
|
||||||
|
* @param {Number} id 关注id
|
||||||
|
* @returns {Object}
|
||||||
|
* @example /follow/del
|
||||||
|
*/
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
key: 'del',
|
key: 'del',
|
||||||
value: function () {
|
value: function () {
|
||||||
@ -190,6 +202,21 @@ var followController = function (_baseController) {
|
|||||||
|
|
||||||
return del;
|
return del;
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加关注
|
||||||
|
* @interface /follow/list
|
||||||
|
* @method POST
|
||||||
|
* @category follow
|
||||||
|
* @foldnumber 10
|
||||||
|
* @param {Number} uid 用户id
|
||||||
|
* @param {Number} projectid 项目id
|
||||||
|
* @param {String} projectname 项目名
|
||||||
|
* @param {String} icon 项目icon
|
||||||
|
* @returns {Object}
|
||||||
|
* @example /follow/add
|
||||||
|
*/
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
key: 'add',
|
key: 'add',
|
||||||
value: function () {
|
value: function () {
|
||||||
|
@ -75,16 +75,16 @@ var logController = function (_baseController) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取节点列表
|
* 获取动态列表
|
||||||
* @interface /node/list
|
* @interface /log/list
|
||||||
* @method GET
|
* @method GET
|
||||||
* @category node
|
* @category log
|
||||||
* @foldnumber 10
|
* @foldnumber 10
|
||||||
* @param {Number} uid 用户id, 不能为空
|
* @param {Number} uid 用户id, 不能为空
|
||||||
* @param {Number} [page] 分页页码
|
* @param {Number} [page] 分页页码
|
||||||
* @param {Number} [limit] 分页大小
|
* @param {Number} [limit] 分页大小
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
* @example ./api/project/list.json
|
* @example /log/list
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(0, _createClass3.default)(logController, [{
|
(0, _createClass3.default)(logController, [{
|
||||||
|
Loading…
Reference in New Issue
Block a user