@runnerpro/backend 1.6.11 → 1.6.13
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"garmin.d.ts","sourceRoot":"","sources":["../../../../src/workout/garmin.ts"],"names":[],"mappings":"AAkOA,QAAA,MAAM,mBAAmB;;;EAexB,CAAC;AAEF,QAAA,MAAM,mBAAmB,6CASxB,CAAC;AAEF,QAAA,MAAM,mBAAmB,6CAMxB,CAAC;AAEF,QAAA,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"garmin.d.ts","sourceRoot":"","sources":["../../../../src/workout/garmin.ts"],"names":[],"mappings":"AAkOA,QAAA,MAAM,mBAAmB;;;EAexB,CAAC;AAEF,QAAA,MAAM,mBAAmB,6CASxB,CAAC;AAEF,QAAA,MAAM,mBAAmB,6CAMxB,CAAC;AAEF,QAAA,MAAM,qBAAqB,6CAqB1B,CAAC;AAEF,QAAA,MAAM,2BAA2B,4DAWhC,CAAC;AAIF,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -246,12 +246,22 @@ const deleteWorkoutGarmin = (userid, workout) => {
|
|
|
246
246
|
exports.deleteWorkoutGarmin = deleteWorkoutGarmin;
|
|
247
247
|
const scheduleWorkoutGarmin = (userid, workout) => {
|
|
248
248
|
console.log('scheduleWorkoutGarmin');
|
|
249
|
+
console.log(userid, workout);
|
|
250
|
+
console.log({
|
|
251
|
+
url: 'https://apis.garmin.com/training-api/schedule',
|
|
252
|
+
userid,
|
|
253
|
+
httpMethod: 'POST',
|
|
254
|
+
params: {
|
|
255
|
+
workoutId: workout.workoutGarminId,
|
|
256
|
+
date: workout.date,
|
|
257
|
+
},
|
|
258
|
+
});
|
|
249
259
|
return garminOauthActivity({
|
|
250
260
|
url: 'https://apis.garmin.com/training-api/schedule',
|
|
251
261
|
userid,
|
|
252
262
|
httpMethod: 'POST',
|
|
253
263
|
params: {
|
|
254
|
-
workoutId: workout.
|
|
264
|
+
workoutId: workout.workoutGarminId,
|
|
255
265
|
date: workout.date,
|
|
256
266
|
},
|
|
257
267
|
});
|
|
@@ -34,7 +34,7 @@ const sendWorkoutToWatch = (clientId, workoutId) => __awaiter(void 0, void 0, vo
|
|
|
34
34
|
// Llamar a la función que envía el workout al Garmin
|
|
35
35
|
const { workoutGarminId } = yield (0, garmin_1.createWorkoutGarmin)(clientId, workout);
|
|
36
36
|
console.log({ workoutGarminId });
|
|
37
|
-
yield (0, garmin_1.scheduleWorkoutGarmin)(clientId, { date: (0, moment_1.default)(workout.date).format('YYYY-MM-DD'),
|
|
37
|
+
yield (0, garmin_1.scheduleWorkoutGarmin)(clientId, { date: (0, moment_1.default)(workout.date).format('YYYY-MM-DD'), workoutGarminId });
|
|
38
38
|
return { success: true };
|
|
39
39
|
});
|
|
40
40
|
exports.sendWorkoutToWatch = sendWorkoutToWatch;
|