sumba 1.0.1 → 1.0.3
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/bajo/config.json +2 -2
- package/bajo/hook/dobo.sumba-user@after-record-validation.js +3 -3
- package/package.json +1 -1
- package/waibuRestApi/route/{site → info}/get.js +1 -1
- package/waibuRestApi/route/{profile → my-stuff/profile}/get.js +1 -1
- package/waibuRestApi/route/{profile → my-stuff/profile}/update.js +1 -1
- package/waibuRestApi/route/{access-token → user/access-token}/@type/create.js +1 -1
- package/waibuRestApi/route/{api-key → user/api-key}/get.js +1 -1
- /package/waibuRestApi/route/{change-password → my-stuff/change-password}/update.js +0 -0
package/bajo/config.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
async function
|
|
1
|
+
async function doboSumbaUserAfterRecordValidation (body, options) {
|
|
2
2
|
const { isBcrypt, isMd5, hash } = this.app.bajoExtra
|
|
3
3
|
const { has } = this.app.bajo.lib._
|
|
4
4
|
|
|
5
5
|
if (has(body, 'password') && !isBcrypt(body.password)) body.password = await hash(body.password, 'bcrypt')
|
|
6
|
-
if (has(body, 'token') && !isMd5(body.token)) body.token = await hash(body.
|
|
6
|
+
if (has(body, 'token') && !isMd5(body.token)) body.token = await hash(body.password)
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default doboSumbaUserAfterRecordValidation
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ const hidden = []
|
|
|
2
2
|
const model = 'SumbaSite'
|
|
3
3
|
|
|
4
4
|
async function get ({ ctx }) {
|
|
5
|
-
const { recordGet } = this.app.
|
|
5
|
+
const { recordGet } = this.app.waibuDb
|
|
6
6
|
const { docSchemaModel } = this.app.waibuRestApi
|
|
7
7
|
|
|
8
8
|
const schema = await docSchemaModel({ model, method: 'get', ctx, options: { hidden, noId: true } })
|
|
@@ -2,7 +2,7 @@ const model = 'SumbaUser'
|
|
|
2
2
|
const hidden = ['password', 'token', 'siteId']
|
|
3
3
|
|
|
4
4
|
async function get ({ ctx }) {
|
|
5
|
-
const { recordGet } = this.app.
|
|
5
|
+
const { recordGet } = this.app.waibuDb
|
|
6
6
|
const { docSchemaModel } = this.app.waibuRestApi
|
|
7
7
|
const schema = await docSchemaModel({ model, method: 'get', ctx, options: { hidden, noId: true } })
|
|
8
8
|
const handler = async function get (req, reply, options) {
|
|
@@ -2,7 +2,7 @@ const model = 'SumbaUser'
|
|
|
2
2
|
const hidden = ['password', 'token', 'siteId']
|
|
3
3
|
|
|
4
4
|
async function get ({ ctx }) {
|
|
5
|
-
const { recordUpdate } = this.app.
|
|
5
|
+
const { recordUpdate } = this.app.waibuDb
|
|
6
6
|
const { omit } = this.app.bajo.lib._
|
|
7
7
|
|
|
8
8
|
const { docSchemaModel } = this.app.waibuRestApi
|
|
File without changes
|