lrf 2 tahun lalu
induk
melakukan
0d8f6bf6af
2 mengubah file dengan 6 tambahan dan 6 penghapusan
  1. 2 2
      app/controller/config/.user.js
  2. 4 4
      app/service/user.js

+ 2 - 2
app/controller/config/.user.js

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ['!openid', 'name', 'gender', 'phone', 'email', 'type', 'icon', 'card'],
+    requestBody: ['openid', 'name', 'gender', 'phone', 'email', 'type', 'icon', 'card'],
   },
   destroy: {
     params: ['!id'],
@@ -12,7 +12,7 @@ module.exports = {
   },
   show: {
     parameters: {
-      params: ['!openid'],
+      params: ['!id'],
     },
     service: 'fetch',
   },

+ 4 - 4
app/service/user.js

@@ -9,10 +9,10 @@ class UserService extends CrudService {
     this.model = this.ctx.model.User;
   }
 
-  async fetch({ openid }) {
-    const res = await this.model.findOne({ openid });
-    return res;
-  }
+  // async fetch({ openid }) {
+  //   const res = await this.model.findOne({ openid });
+  //   return res;
+  // }
 
   /**
    * 检查数据重复