@waline/vercel 1.23.4 → 1.23.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/controller/db.js +3 -0
- package/src/controller/user.js +11 -1
- package/src/logic/user.js +3 -0
package/package.json
CHANGED
package/src/controller/db.js
CHANGED
|
@@ -51,6 +51,9 @@ module.exports = class extends BaseRest {
|
|
|
51
51
|
const storage = this.config('storage');
|
|
52
52
|
const model = this.service(`storage/${storage}`, table);
|
|
53
53
|
|
|
54
|
+
delete data.objectId;
|
|
55
|
+
delete data.createdAt;
|
|
56
|
+
delete data.updatedAt;
|
|
54
57
|
await model.update(data, { objectId });
|
|
55
58
|
|
|
56
59
|
return this.success();
|
package/src/controller/user.js
CHANGED
|
@@ -11,7 +11,17 @@ module.exports = class extends BaseRest {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
async getAction() {
|
|
14
|
-
const { page, pageSize } = this.get();
|
|
14
|
+
const { page, pageSize, email } = this.get();
|
|
15
|
+
|
|
16
|
+
if (email) {
|
|
17
|
+
const user = await this.modelInstance.select({ email });
|
|
18
|
+
|
|
19
|
+
if (think.isEmpty(user)) {
|
|
20
|
+
return this.success();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return this.success(user[0]);
|
|
24
|
+
}
|
|
15
25
|
|
|
16
26
|
const count = await this.modelInstance.count({});
|
|
17
27
|
const users = await this.modelInstance.select(
|