(ctx)
| 213 | } |
| 214 | |
| 215 | async getMyGroup(ctx){ |
| 216 | var groupInst = yapi.getInst(groupModel); |
| 217 | let privateGroup = await groupInst.getByPrivateUid(this.getUid()); |
| 218 | if (!privateGroup) { |
| 219 | privateGroup = await groupInst.save({ |
| 220 | uid: this.getUid(), |
| 221 | group_name: 'User-' + this.getUid(), |
| 222 | add_time: yapi.commons.time(), |
| 223 | up_time: yapi.commons.time(), |
| 224 | type: 'private' |
| 225 | }); |
| 226 | } |
| 227 | if(privateGroup){ |
| 228 | ctx.body = yapi.commons.resReturn(privateGroup) |
| 229 | }else{ |
| 230 | ctx.body = yapi.commons.resReturn(null) |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | /** |
| 235 | * 添加项目分组成员 |
nothing calls this directly
no test coverage detected