sumba 1.2.4 → 1.2.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/waibuMpa/extend/waibuAdmin/route/reset-user-password.js +1 -1
- package/waibuMpa/route/help/contact-form.js +2 -2
- package/waibuMpa/route/help/trouble-tickets/add.js +1 -1
- package/waibuMpa/route/help/trouble-tickets/details/@id.js +1 -1
- package/waibuMpa/route/help/trouble-tickets/list.js +1 -1
- package/waibuMpa/route/info/@item.js +1 -1
- package/waibuMpa/route/signin.js +1 -1
- package/waibuMpa/route/signout.js +1 -1
- package/waibuMpa/route/user/activation.js +1 -1
- package/waibuMpa/route/user/forgot-password/@fpl.js +2 -2
- package/waibuMpa/route/user/forgot-password.js +2 -2
- package/waibuMpa/route/user/signup.js +2 -2
- package/waibuMpa/route/your-stuff/change-password.js +1 -1
- package/waibuMpa/route/your-stuff/profile/edit.js +1 -1
- package/waibuMpa/route/your-stuff/profile.js +1 -1
- package/waibuMpa/route/your-stuff/reset-api-key.js +1 -1
package/package.json
CHANGED
|
@@ -12,13 +12,13 @@ const contactForm = {
|
|
|
12
12
|
try {
|
|
13
13
|
const { data } = await recordCreate({ model: 'SumbaContactForm', req, reply, options: { noFlash: true } })
|
|
14
14
|
req.flash('notify', req.t('contactFormSubmitted'))
|
|
15
|
-
return reply.view('sumba.template:/help/contact-form/success.html', { form: req.body, data })
|
|
15
|
+
return await reply.view('sumba.template:/help/contact-form/success.html', { form: req.body, data })
|
|
16
16
|
} catch (err) {
|
|
17
17
|
error = err
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
const cats = await recordFind({ model: 'SumbaContactFormCat', req, options: { sort: 'level:1+name:1', limit: -1, dataOnly: true } })
|
|
21
|
-
return reply.view('sumba.template:/help/contact-form/form.html', { form, error, cats })
|
|
21
|
+
return await reply.view('sumba.template:/help/contact-form/form.html', { form, error, cats })
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -17,7 +17,7 @@ const add = {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
const cats = await recordFind({ model: 'SumbaTicketCat', req, options: { sort: 'level:1+name:1', limit: -1, dataOnly: true } })
|
|
20
|
-
return reply.view('sumba.template:/help/trouble-tickets/add.html', { form, error, cats })
|
|
20
|
+
return await reply.view('sumba.template:/help/trouble-tickets/add.html', { form, error, cats })
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -33,7 +33,7 @@ const id = {
|
|
|
33
33
|
return `<c:div margin="bottom-3"><c:badge background="color:${isMe ? 'primary' : 'secondary'}" t:content="${isMe ? 'you' : 'us'}" /> <small>${req.format(val, 'datetime')}</small></c:div> ${message}`
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
return reply.view('sumba.template:/help/trouble-tickets/details.html', { list, schema, master, form, error })
|
|
36
|
+
return await reply.view('sumba.template:/help/trouble-tickets/details.html', { list, schema, master, form, error })
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -16,7 +16,7 @@ const list = {
|
|
|
16
16
|
return `<strong>${val}</strong><br />${getExcerpt(rec.message, 35)}`
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
return reply.view('sumba.template:/help/trouble-tickets/list.html', { list, schema })
|
|
19
|
+
return await reply.view('sumba.template:/help/trouble-tickets/list.html', { list, schema })
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
package/waibuMpa/route/signin.js
CHANGED
|
@@ -18,7 +18,7 @@ const signout = {
|
|
|
18
18
|
req.flash('notify', req.t('signoutSuccessfully'))
|
|
19
19
|
return reply.redirectTo(url, { query, params })
|
|
20
20
|
}
|
|
21
|
-
return reply.view('sumba.template:/signout.html', { form: { referer } })
|
|
21
|
+
return await reply.view('sumba.template:/signout.html', { form: { referer } })
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -27,7 +27,7 @@ const forgotPasswordLink = {
|
|
|
27
27
|
|
|
28
28
|
const form = defaultsDeep(req.body, {})
|
|
29
29
|
const user = await getUser.call(this, req, reply)
|
|
30
|
-
if (isString(user)) return reply.view(user)
|
|
30
|
+
if (isString(user)) return await reply.view(user)
|
|
31
31
|
form.username = user.username
|
|
32
32
|
let error
|
|
33
33
|
if (req.method === 'POST') {
|
|
@@ -56,7 +56,7 @@ const forgotPasswordLink = {
|
|
|
56
56
|
error = err
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
return reply.view('sumba.template:/user/fpl.html', { form, error })
|
|
59
|
+
return await reply.view('sumba.template:/user/fpl.html', { form, error })
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -3,7 +3,7 @@ const model = 'SumbaUser'
|
|
|
3
3
|
const profile = {
|
|
4
4
|
method: ['GET', 'POST'],
|
|
5
5
|
handler: async function (req, reply) {
|
|
6
|
-
if (!this.app.masohiMail) return reply.view('sumba.template:/user/forgot-password.html')
|
|
6
|
+
if (!this.app.masohiMail) return await reply.view('sumba.template:/user/forgot-password.html')
|
|
7
7
|
const { sendMail } = this.app.waibu
|
|
8
8
|
const { defaultsDeep } = this.lib.aneka
|
|
9
9
|
const { dayjs } = this.lib
|
|
@@ -32,7 +32,7 @@ const profile = {
|
|
|
32
32
|
error = err
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
return reply.view('sumba.template:/user/forgot-password.html', { form, error })
|
|
35
|
+
return await reply.view('sumba.template:/user/forgot-password.html', { form, error })
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -26,12 +26,12 @@ const signup = {
|
|
|
26
26
|
req.body.provider = 'local'
|
|
27
27
|
const { data } = await recordCreate({ model: 'SumbaUser', req, reply, options: { validation, noFlash: true, forceNoHidden: true } })
|
|
28
28
|
req.flash('notify', req.t('userCreated'))
|
|
29
|
-
return reply.view('sumba.template:/user/signup/success.html', { form: req.body, data })
|
|
29
|
+
return await reply.view('sumba.template:/user/signup/success.html', { form: req.body, data })
|
|
30
30
|
} catch (err) {
|
|
31
31
|
error = err
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
return reply.view('sumba.template:/user/signup/form.html', { form, error })
|
|
34
|
+
return await reply.view('sumba.template:/user/signup/form.html', { form, error })
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -7,7 +7,7 @@ const profile = {
|
|
|
7
7
|
const resp = await recordGet({ model: 'SumbaUser', req, id: req.user.id, options })
|
|
8
8
|
const form = resp.data
|
|
9
9
|
form.token = await hash(form.salt)
|
|
10
|
-
return reply.view('sumba.template:/your-stuff/profile/view.html', { form })
|
|
10
|
+
return await reply.view('sumba.template:/your-stuff/profile/view.html', { form })
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|