@iamnnort/nestjs-serializer 2.2.0 → 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.
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -9199,6 +9199,7 @@ SerializerService = exports.SerializerService = _ts_decorate([
|
|
|
9199
9199
|
], SerializerService);
|
|
9200
9200
|
|
|
9201
9201
|
// src/interceptor.ts
|
|
9202
|
+
|
|
9202
9203
|
function _ts_decorate2(decorators, target, key, desc) {
|
|
9203
9204
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9204
9205
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -9243,6 +9244,9 @@ var SerializerInterceptor = /* @__PURE__ */ __name((config) => {
|
|
|
9243
9244
|
if (request.query.secret) {
|
|
9244
9245
|
return config.secretScopes || this.serializerService.config.globalSecretScopes || config.scopes;
|
|
9245
9246
|
}
|
|
9247
|
+
if (request.query.scopes && config.allowedScopes) {
|
|
9248
|
+
return _lodash.intersection.call(void 0, request.query.scopes, config.allowedScopes);
|
|
9249
|
+
}
|
|
9246
9250
|
return config.scopes;
|
|
9247
9251
|
}
|
|
9248
9252
|
};
|