MCPcopy Index your code
hub / github.com/YMFE/yapi / upStudy

Method upStudy

server/controllers/user.js:96–108  ·  view source on GitHub ↗

* 更新 * @interface /user/up_study * @method GET * @category user * @foldnumber 10 * @returns {Object} * @example

(ctx)

Source from the content-addressed store, hash-verified

94 */
95
96 async upStudy(ctx) {
97 let userInst = yapi.getInst(userModel); //创建user实体
98 let data = {
99 up_time: yapi.commons.time(),
100 study: true
101 };
102 try {
103 let result = await userInst.update(this.getUid(), data);
104 ctx.body = yapi.commons.resReturn(result);
105 } catch (e) {
106 ctx.body = yapi.commons.resReturn(null, 401, e.message);
107 }
108 }
109
110 async loginByToken(ctx) {
111 try {

Callers

nothing calls this directly

Calls 2

updateMethod · 0.45
getUidMethod · 0.45

Tested by

no test coverage detected