ng-miam 3.1.0 → 3.1.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/bundles/ng-miam.umd.js +7 -3
- package/bundles/ng-miam.umd.js.map +1 -1
- package/bundles/ng-miam.umd.min.js +1 -1
- package/bundles/ng-miam.umd.min.js.map +1 -1
- package/esm2015/lib/_services/recipe-likes.service.js +11 -5
- package/fesm2015/ng-miam.js +7 -3
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_services/recipe-likes.service.d.ts +3 -1
- package/package.json +1 -1
package/bundles/ng-miam.umd.js
CHANGED
|
@@ -4217,8 +4217,9 @@
|
|
|
4217
4217
|
|
|
4218
4218
|
var RecipeLikesService = /** @class */ (function (_super) {
|
|
4219
4219
|
__extends(RecipeLikesService, _super);
|
|
4220
|
-
function RecipeLikesService() {
|
|
4220
|
+
function RecipeLikesService(userService) {
|
|
4221
4221
|
var _this = _super.call(this) || this;
|
|
4222
|
+
_this.userService = userService;
|
|
4222
4223
|
_this.resource = RecipeLike;
|
|
4223
4224
|
_this.type = 'recipe-likes';
|
|
4224
4225
|
_this.activeRecipeLikes = new Map();
|
|
@@ -4254,6 +4255,9 @@
|
|
|
4254
4255
|
};
|
|
4255
4256
|
RecipeLikesService.prototype.addLikesOfRecipes = function (recipes) {
|
|
4256
4257
|
var _this = this;
|
|
4258
|
+
if (!this.userService.isLogged$.value) {
|
|
4259
|
+
return rxjs.of(null);
|
|
4260
|
+
}
|
|
4257
4261
|
return this.all({
|
|
4258
4262
|
page: { size: 20, number: 1 },
|
|
4259
4263
|
remotefilter: {
|
|
@@ -4277,7 +4281,7 @@
|
|
|
4277
4281
|
};
|
|
4278
4282
|
return RecipeLikesService;
|
|
4279
4283
|
}(i1.Service));
|
|
4280
|
-
RecipeLikesService.ɵfac = function RecipeLikesService_Factory(t) { return new (t || RecipeLikesService)(); };
|
|
4284
|
+
RecipeLikesService.ɵfac = function RecipeLikesService_Factory(t) { return new (t || RecipeLikesService)(i0.ɵɵinject(UserService)); };
|
|
4281
4285
|
RecipeLikesService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeLikesService, factory: RecipeLikesService.ɵfac, providedIn: 'root' });
|
|
4282
4286
|
/*@__PURE__*/ (function () {
|
|
4283
4287
|
i0.ɵsetClassMetadata(RecipeLikesService, [{
|
|
@@ -4285,7 +4289,7 @@
|
|
|
4285
4289
|
args: [{
|
|
4286
4290
|
providedIn: 'root'
|
|
4287
4291
|
}]
|
|
4288
|
-
}], function () { return []; }, null);
|
|
4292
|
+
}], function () { return [{ type: UserService }]; }, null);
|
|
4289
4293
|
})();
|
|
4290
4294
|
|
|
4291
4295
|
// THIS IS JUST AN EXAMPLE - UNUSED IN THE CODE
|