MCPcopy
hub / github.com/YMFE/yapi / get

Method get

server/controllers/group.js:98–112  ·  view source on GitHub ↗

* 查询项目分组 * @interface /group/get * @method GET * @category group * @foldnumber 10 * @param {String} id 项目分组ID * @returns {Object} * @example

(ctx)

Source from the content-addressed store, hash-verified

96 * @example
97 */
98 async get(ctx) {
99 let params = ctx.params;
100
101 let groupInst = yapi.getInst(groupModel);
102 let result = await groupInst.getGroupById(params.id);
103 if (result) {
104 result = result.toObject();
105 let role = await this.getProjectRole(params.id, 'group');
106 result.role = role;
107 if (result.type === 'private') {
108 result.group_name = '个人空间';
109 }
110 ctx.body = yapi.commons.resReturn(result);
111 }
112 }
113
114 /**
115 * 添加项目分组

Callers 15

getCaseListMethod · 0.45
getCaseEnvListMethod · 0.45
addCaseMethod · 0.45
addCaseListMethod · 0.45
upCaseMethod · 0.45
getCaseMethod · 0.45
upColMethod · 0.45
delColMethod · 0.45
delCaseMethod · 0.45
getMemberListMethod · 0.45
syncGetMethod · 0.45

Calls 2

getGroupByIdMethod · 0.80
getProjectRoleMethod · 0.80

Tested by

no test coverage detected