sumba 2.1.9 → 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.
@@ -1,11 +1,11 @@
1
1
  const hidden = []
2
2
  const model = 'SumbaSite'
3
3
 
4
- async function get ({ ctx }) {
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', ctx, options: { hidden, noId: true } })
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,6 +1,6 @@
1
1
  import { data } from '../../../../../lib/token-schema.js'
2
2
 
3
- async function get ({ ctx }) {
3
+ async function get () {
4
4
  const schema = {
5
5
  response: {
6
6
  '2xx': {
@@ -1,6 +1,6 @@
1
1
  import { response } from './update.js'
2
2
 
3
- async function get ({ ctx }) {
3
+ async function get () {
4
4
  const { hash } = this.app.bajoExtra
5
5
  const schema = { response: await response.call(this) }
6
6
  const handler = async function get (req, reply) {
@@ -19,7 +19,7 @@ export const body = {
19
19
  }
20
20
  }
21
21
 
22
- async function update ({ ctx }) {
22
+ async function update () {
23
23
  const { importPkg } = this.app.bajo
24
24
  const { generateId } = this.app.lib.aneka
25
25
  const { hash } = this.app.bajoExtra
@@ -23,7 +23,7 @@ export const body = {
23
23
 
24
24
  const model = 'SumbaUser'
25
25
 
26
- async function update ({ ctx }) {
26
+ async function update () {
27
27
  const { importPkg } = this.app.bajo
28
28
  const bcrypt = await importPkg('bajoExtra:bcrypt')
29
29
 
@@ -1,10 +1,10 @@
1
1
  const model = 'SumbaUser'
2
2
  const hidden = ['password', 'token', 'siteId', 'salt']
3
3
 
4
- async function get ({ ctx }) {
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', ctx, options: { hidden, noId: true } })
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 ({ ctx }) {
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', ctx, options: { hidden, noId: true } })
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])
package/index.js CHANGED
@@ -115,6 +115,7 @@ async function factory (pkgName) {
115
115
  },
116
116
  siteSetting: {
117
117
  forgotPasswordExpDur: '5m',
118
+ timeZone: 'UTC',
118
119
  userPassword: {
119
120
  minUppercase: 1,
120
121
  minLowercase: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumba",
3
- "version": "2.1.9",
3
+ "version": "2.2.1",
4
4
  "description": "Biz Suite for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-02-08
4
+
5
+ - [2.2.0] Add ```siteSetting.timeZone``` in config object
6
+
3
7
  ## 2026-02-06
4
8
 
5
9
  - [2.1.9] Bug fix on ```getSite()``` for multisite system