@thzero/library_server_fastify 0.17.14 → 0.17.15

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 CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@thzero/library_server_fastify",
3
3
  "type": "module",
4
- "version": "0.17.14",
4
+ "version": "0.17.15",
5
5
  "version_major": 0,
6
6
  "version_minor": 17,
7
- "version_patch": 14,
7
+ "version_patch": 15,
8
8
  "version_date": "10/02/2023",
9
9
  "description": "An opinionated library of common functionality to bootstrap a Fastify based API application.",
10
10
  "author": "thZero",
package/plugins/auth.js CHANGED
@@ -85,7 +85,7 @@ function auth (functions, opts) {
85
85
  }
86
86
 
87
87
  this.onAuth = function onAuth (err, results) {
88
- if (that.options.relation === 'or') {
88
+ if (that.options.relation === LibraryCommonConstants.Security.logicalOr) {
89
89
  if (err) {
90
90
  return that.nextAuth(err)
91
91
  }
@@ -1,3 +1,4 @@
1
+ import LibraryCommonnConstants from '@thzero/library_common/constants.js';
1
2
  import LibraryServerConstants from '@thzero/library_server/constants.js';
2
3
 
3
4
  import BaseRoute from './index.js';
@@ -27,8 +28,8 @@ class BaseNewsRoute extends BaseRoute {
27
28
  router.authenticationDefault,
28
29
  // router.authorizationDefault
29
30
  ],
30
- {
31
- relation: 'and',
31
+ {
32
+ relation: LibraryCommonnConstants.Security.logicalAnd,
32
33
  required: false,
33
34
  roles: [ 'news' ]
34
35
  }),
@@ -1,3 +1,4 @@
1
+ import LibraryCommonnConstants from '@thzero/library_common/constants.js';
1
2
  import LibraryServerConstants from '@thzero/library_server/constants.js';
2
3
 
3
4
  import BaseRoute from './index.js';
@@ -37,7 +38,7 @@ class BaseUsersRoute extends BaseRoute {
37
38
  // router.authorizationDefault
38
39
  ],
39
40
  {
40
- relation: 'and',
41
+ relation: LibraryCommonnConstants.Security.logicalAnd,
41
42
  required: false,
42
43
  roles: [ 'user' ]
43
44
  }),
@@ -61,8 +62,8 @@ class BaseUsersRoute extends BaseRoute {
61
62
  router.authenticationDefault,
62
63
  // router.authorizationDefault
63
64
  ],
64
- {
65
- relation: 'and',
65
+ {
66
+ relation: LibraryCommonnConstants.Security.logicalAnd,
66
67
  required: false,
67
68
  roles: [ 'user' ]
68
69
  }),
@@ -87,7 +88,7 @@ class BaseUsersRoute extends BaseRoute {
87
88
  router.authorizationDefault
88
89
  ],
89
90
  {
90
- relation: 'and',
91
+ relation: LibraryCommonnConstants.Security.logicalAnd,
91
92
  roles: [ 'user' ]
92
93
  }),
93
94
  },
@@ -111,7 +112,7 @@ class BaseUsersRoute extends BaseRoute {
111
112
  // router.authorizationDefault
112
113
  ],
113
114
  {
114
- relation: 'and',
115
+ relation: LibraryCommonnConstants.Security.logicalAnd,
115
116
  roles: [ 'user' ]
116
117
  }),
117
118
  },
@@ -134,8 +135,8 @@ class BaseUsersRoute extends BaseRoute {
134
135
  router.authenticationDefault,
135
136
  router.authorizationDefault
136
137
  ],
137
- {
138
- relation: 'and',
138
+ {
139
+ relation: LibraryCommonnConstants.Security.logicalAnd,
139
140
  roles: [ 'user' ]
140
141
  }),
141
142
  },
package/routes/home.js CHANGED
@@ -1,3 +1,6 @@
1
+ import LibraryCommonnConstants from '@thzero/library_common/constants.js';
2
+ import LibraryServerConstants from '@thzero/library_server/constants.js';
3
+
1
4
  import BaseRoute from './index.js';
2
5
 
3
6
  class HomeRoute extends BaseRoute {
package/routes/plans.js CHANGED
@@ -1,3 +1,4 @@
1
+ import LibraryCommonnConstants from '@thzero/library_common/constants.js';
1
2
  import LibraryServerConstants from '@thzero/library_server/constants.js';
2
3
 
3
4
  import BaseRoute from './index.js';
package/routes/utility.js CHANGED
@@ -47,8 +47,8 @@ class UtilityRoute extends BaseRoute {
47
47
  router.authenticationDefault,
48
48
  // router.authorizationDefault
49
49
  ],
50
- {
51
- relation: 'and',
50
+ {
51
+ relation: LibraryCommonnConstants.Security.logicalAnd,
52
52
  required: false,
53
53
  roles: [ 'utility' ]
54
54
  }),