goldstars-services 1.0.32 → 1.0.34
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.
|
@@ -192,7 +192,7 @@ var getActiveTrainer = () => {
|
|
|
192
192
|
* @returns {Promise<UserModel[]>}
|
|
193
193
|
*/
|
|
194
194
|
|
|
195
|
-
var
|
|
195
|
+
var unsubscribeTrainer = /*#__PURE__*/function () {
|
|
196
196
|
var _ref6 = _asyncToGenerator(function* (_ref5) {
|
|
197
197
|
var {
|
|
198
198
|
clienteId,
|
|
@@ -201,13 +201,13 @@ var unsubscribePacient = /*#__PURE__*/function () {
|
|
|
201
201
|
var updatedClient = yield _user.default.findOneAndUpdate({
|
|
202
202
|
_id: clienteId
|
|
203
203
|
}, {
|
|
204
|
-
|
|
204
|
+
trainer: null
|
|
205
205
|
});
|
|
206
206
|
var updatedTrainer = yield _user.default.findOneAndUpdate({
|
|
207
207
|
_id: entrenadorId
|
|
208
208
|
}, {
|
|
209
209
|
$pull: {
|
|
210
|
-
"isTrainer.
|
|
210
|
+
"isTrainer.users": entrenadorId
|
|
211
211
|
}
|
|
212
212
|
});
|
|
213
213
|
if (!(updatedClient && updatedTrainer)) {
|
|
@@ -216,7 +216,7 @@ var unsubscribePacient = /*#__PURE__*/function () {
|
|
|
216
216
|
var trainers = yield getActiveTrainer();
|
|
217
217
|
return trainers;
|
|
218
218
|
});
|
|
219
|
-
return function
|
|
219
|
+
return function unsubscribeTrainer(_x4) {
|
|
220
220
|
return _ref6.apply(this, arguments);
|
|
221
221
|
};
|
|
222
222
|
}();
|
|
@@ -278,7 +278,7 @@ var _default = exports.default = {
|
|
|
278
278
|
checkIfUserIsTrainer,
|
|
279
279
|
getUsers,
|
|
280
280
|
getActiveTrainer,
|
|
281
|
-
|
|
281
|
+
unsubscribeTrainer,
|
|
282
282
|
getTrainersForClientsWithConfirmation,
|
|
283
283
|
getUserIfAdmin,
|
|
284
284
|
softDeleteUser
|