sumba 2.2.0 → 2.2.1
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/extend/waibuRestApi/route/info/get.js +2 -2
- package/extend/waibuRestApi/route/user/api-key/get.js +1 -1
- package/extend/waibuRestApi/route/your-stuff/api-key/get.js +1 -1
- package/extend/waibuRestApi/route/your-stuff/api-key/update.js +1 -1
- package/extend/waibuRestApi/route/your-stuff/change-password/update.js +1 -1
- package/extend/waibuRestApi/route/your-stuff/profile/get.js +2 -2
- package/extend/waibuRestApi/route/your-stuff/profile/update.js +2 -2
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const hidden = []
|
|
2
2
|
const model = 'SumbaSite'
|
|
3
3
|
|
|
4
|
-
async function get (
|
|
4
|
+
async function get () {
|
|
5
5
|
const { getRecord } = this.app.waibuDb
|
|
6
6
|
const { docSchemaModel } = this.app.waibuRestApi
|
|
7
7
|
|
|
8
|
-
const schema = await docSchemaModel({ model, method: 'get',
|
|
8
|
+
const schema = await docSchemaModel({ model, method: 'get', options: { hidden, noId: true } })
|
|
9
9
|
const handler = async function (req, reply, options) {
|
|
10
10
|
options.hidden = hidden
|
|
11
11
|
return await getRecord({ model, req, reply, id: req.site.id, options })
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const model = 'SumbaUser'
|
|
2
2
|
const hidden = ['password', 'token', 'siteId', 'salt']
|
|
3
3
|
|
|
4
|
-
async function get (
|
|
4
|
+
async function get () {
|
|
5
5
|
const { getRecord } = this.app.waibuDb
|
|
6
6
|
const { docSchemaModel } = this.app.waibuRestApi
|
|
7
|
-
const schema = await docSchemaModel({ model, method: 'get',
|
|
7
|
+
const schema = await docSchemaModel({ model, method: 'get', options: { hidden, noId: true } })
|
|
8
8
|
const handler = async function get (req, reply, options) {
|
|
9
9
|
options.hidden = hidden
|
|
10
10
|
return await getRecord({ model, req, reply, id: req.user.id, options })
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const model = 'SumbaUser'
|
|
2
2
|
const hidden = ['password', 'token', 'siteId']
|
|
3
3
|
|
|
4
|
-
async function get (
|
|
4
|
+
async function get () {
|
|
5
5
|
const { updateRecord } = this.app.waibuDb
|
|
6
6
|
const { omit } = this.app.lib._
|
|
7
7
|
|
|
8
8
|
const { docSchemaModel } = this.app.waibuRestApi
|
|
9
|
-
const schema = await docSchemaModel({ model, method: 'update',
|
|
9
|
+
const schema = await docSchemaModel({ model, method: 'update', options: { hidden, noId: true } })
|
|
10
10
|
const handler = async function get (req, reply, options) {
|
|
11
11
|
options.hidden = hidden
|
|
12
12
|
const body = omit(req.body, ['username', 'status', ...hidden])
|