sumba 1.1.23 → 1.1.24
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/dobo/feature/status.js +1 -1
- package/dobo/feature/url.js +1 -1
- package/lib/lat-lng-hook.js +2 -1
- package/package.json +1 -1
- package/plugin/factory.js +4 -3
- package/waibuMpa/extend/waibuAdmin/route/reset-user-password.js +2 -1
- package/waibuMpa/route/help/contact-form.js +1 -1
- package/waibuMpa/route/help/trouble-tickets/add.js +1 -1
- package/waibuMpa/route/user/activation.js +1 -1
- package/waibuMpa/route/user/forgot-password/@fpl.js +2 -1
- package/waibuMpa/route/user/forgot-password.js +1 -1
- package/waibuMpa/route/user/signup.js +2 -1
- package/waibuMpa/route/your-stuff/change-password.js +2 -1
- package/waibuMpa/route/your-stuff/profile/edit.js +1 -1
- package/waibuMpa/route/your-stuff/reset-api-key.js +2 -1
package/dobo/feature/status.js
CHANGED
package/dobo/feature/url.js
CHANGED
package/lib/lat-lng-hook.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
async function hook (body, options) {
|
|
2
|
-
const {
|
|
2
|
+
const { isSet } = this.lib.aneka
|
|
3
|
+
const { round } = this.lib.aneka
|
|
3
4
|
if (!isSet(body[options.fieldName])) return
|
|
4
5
|
body[options.fieldName] = round(body[options.fieldName], options.scale)
|
|
5
6
|
}
|
package/package.json
CHANGED
package/plugin/factory.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
async function getSetting (type, source) {
|
|
2
|
-
const { defaultsDeep } = this.
|
|
2
|
+
const { defaultsDeep } = this.lib.aneka
|
|
3
3
|
const { get } = this.lib._
|
|
4
4
|
|
|
5
5
|
const setting = defaultsDeep(get(this.config, `auth.${source}.${type}`, {}), get(this.config, `auth.common.${type}`, {}))
|
|
@@ -330,7 +330,7 @@ async function factory (pkgName) {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
checkPathsByTeam = ({ paths = [], method = 'GET', teams = [], guards = [] }) => {
|
|
333
|
-
const { includes } = this.
|
|
333
|
+
const { includes } = this.lib.aneka
|
|
334
334
|
const { outmatch } = this.lib
|
|
335
335
|
|
|
336
336
|
for (const item of guards) {
|
|
@@ -377,7 +377,8 @@ async function factory (pkgName) {
|
|
|
377
377
|
const omitted = ['status']
|
|
378
378
|
|
|
379
379
|
const mergeSetting = async (site) => {
|
|
380
|
-
const { defaultsDeep
|
|
380
|
+
const { defaultsDeep } = this.lib.aneka
|
|
381
|
+
const { parseObject } = this.app.bajo
|
|
381
382
|
const { trim, get, filter } = this.lib._
|
|
382
383
|
const { recordFind, recordGet } = this.app.dobo
|
|
383
384
|
const defSetting = {}
|
|
@@ -4,8 +4,9 @@ const resetUserPassword = {
|
|
|
4
4
|
method: ['GET', 'POST'],
|
|
5
5
|
title: 'resetUserPassword',
|
|
6
6
|
handler: async function (req, reply) {
|
|
7
|
-
const {
|
|
7
|
+
const { importPkg } = this.app.bajo
|
|
8
8
|
const { recordFindOne, recordUpdate } = this.app.dobo
|
|
9
|
+
const { defaultsDeep } = this.lib.aneka
|
|
9
10
|
const Joi = await importPkg('dobo:joi')
|
|
10
11
|
const model = 'SumbaUser'
|
|
11
12
|
const form = defaultsDeep(req.body, { username: req.query.username })
|
|
@@ -3,8 +3,8 @@ const model = 'SumbaTicket'
|
|
|
3
3
|
const add = {
|
|
4
4
|
method: ['GET', 'POST'],
|
|
5
5
|
handler: async function (req, reply) {
|
|
6
|
+
const { defaultsDeep } = this.lib.aneka
|
|
6
7
|
const { recordCreate, recordFind } = this.app.waibuDb
|
|
7
|
-
const { defaultsDeep } = this.lib._
|
|
8
8
|
const options = {}
|
|
9
9
|
const form = defaultsDeep(req.body, {})
|
|
10
10
|
let error
|
|
@@ -3,7 +3,7 @@ const model = 'SumbaUser'
|
|
|
3
3
|
const userActivation = {
|
|
4
4
|
method: ['GET', 'POST'],
|
|
5
5
|
handler: async function (req, reply) {
|
|
6
|
-
const { defaultsDeep } = this.
|
|
6
|
+
const { defaultsDeep } = this.lib.aneka
|
|
7
7
|
const { recordFind, recordUpdate } = this.app.dobo
|
|
8
8
|
const form = defaultsDeep(req.body, { key: req.query.key })
|
|
9
9
|
let error
|
|
@@ -19,7 +19,8 @@ const forgotPasswordLink = {
|
|
|
19
19
|
method: ['GET', 'POST'],
|
|
20
20
|
handler: async function (req, reply) {
|
|
21
21
|
const { sendMail } = this.app.waibu
|
|
22
|
-
const { defaultsDeep
|
|
22
|
+
const { defaultsDeep } = this.lib.aneka
|
|
23
|
+
const { importPkg } = this.app.bajo
|
|
23
24
|
const { isString } = this.lib._
|
|
24
25
|
const { recordUpdate } = this.app.dobo
|
|
25
26
|
const Joi = await importPkg('dobo:joi')
|
|
@@ -5,7 +5,7 @@ const profile = {
|
|
|
5
5
|
handler: async function (req, reply) {
|
|
6
6
|
if (!this.app.masohiMail) return reply.view('sumba.template:/user/forgot-password.html')
|
|
7
7
|
const { sendMail } = this.app.waibu
|
|
8
|
-
const { defaultsDeep } = this.
|
|
8
|
+
const { defaultsDeep } = this.lib.aneka
|
|
9
9
|
const { dayjs } = this.lib
|
|
10
10
|
const { recordFind } = this.app.dobo
|
|
11
11
|
const form = defaultsDeep(req.body, {})
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
const signup = {
|
|
2
2
|
method: ['GET', 'POST'],
|
|
3
3
|
handler: async function (req, reply) {
|
|
4
|
-
const { defaultsDeep
|
|
4
|
+
const { defaultsDeep } = this.lib.aneka
|
|
5
|
+
const { generateId } = this.app.bajo
|
|
5
6
|
const { recordCreate } = this.app.waibuDb
|
|
6
7
|
|
|
7
8
|
const form = defaultsDeep(req.body, {})
|
|
@@ -3,7 +3,8 @@ import passwordRule from '../../../lib/password-rule.js'
|
|
|
3
3
|
const profile = {
|
|
4
4
|
method: ['GET', 'POST'],
|
|
5
5
|
handler: async function (req, reply) {
|
|
6
|
-
const { defaultsDeep
|
|
6
|
+
const { defaultsDeep } = this.lib.aneka
|
|
7
|
+
const { importPkg } = this.app.bajo
|
|
7
8
|
const { recordGet, recordUpdate } = this.app.dobo
|
|
8
9
|
const bcrypt = await importPkg('bajoExtra:bcrypt')
|
|
9
10
|
const Joi = await importPkg('dobo:joi')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const profile = {
|
|
2
2
|
method: ['GET', 'POST'],
|
|
3
3
|
handler: async function (req, reply) {
|
|
4
|
-
const { defaultsDeep } = this.
|
|
4
|
+
const { defaultsDeep } = this.lib.aneka
|
|
5
5
|
// const { attachmentCopyUploaded } = this.app.dobo
|
|
6
6
|
const { recordUpdate, recordGet } = this.app.waibuDb
|
|
7
7
|
const { omit, pick } = this.lib._
|
|
@@ -3,7 +3,8 @@ const model = 'SumbaUser'
|
|
|
3
3
|
const resetApiKey = {
|
|
4
4
|
method: ['GET', 'POST'],
|
|
5
5
|
handler: async function (req, reply) {
|
|
6
|
-
const { defaultsDeep
|
|
6
|
+
const { defaultsDeep } = this.lib.aneka
|
|
7
|
+
const { importPkg, generateId } = this.app.bajo
|
|
7
8
|
const { recordGet, recordUpdate } = this.app.dobo
|
|
8
9
|
const { hash } = this.app.bajoExtra
|
|
9
10
|
const delay = await importPkg('bajo:delay')
|