Skip to content

Commit

Permalink
fix: #516
Browse files Browse the repository at this point in the history
  • Loading branch information
yihong0618 committed Oct 11, 2023
1 parent a0d6ed5 commit d49d973
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
8 changes: 1 addition & 7 deletions run_page/garmin_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import argparse
import asyncio
import json
import logging
import os
import sys
Expand All @@ -27,24 +26,19 @@

TIME_OUT = httpx.Timeout(240.0, connect=360.0)
GARMIN_COM_URL_DICT = {
"BASE_URL": "https://connectapi.garmin.com",
"SSO_URL_ORIGIN": "https://sso.garmin.com",
"SSO_URL": "https://sso.garmin.com/sso",
# "MODERN_URL": "https://connect.garmin.com/modern",
"MODERN_URL": "https://connectapi.garmin.com",
"SIGNIN_URL": "https://sso.garmin.com/sso/signin",
"CSS_URL": "https://static.garmincdn.com/com.garmin.connect/ui/css/gauth-custom-v1.2-min.css",
"UPLOAD_URL": "https://connectapi.garmin.com/upload-service/upload/",
"ACTIVITY_URL": "https://connectapi.garmin.com/activity-service/activity/{activity_id}",
}

GARMIN_CN_URL_DICT = {
"BASE_URL": "https://connectapi.garmin.cn",
"SSO_URL_ORIGIN": "https://sso.garmin.com",
"SSO_URL": "https://sso.garmin.cn/sso",
"MODERN_URL": "https://connectapi.garmin.cn",
"SIGNIN_URL": "https://sso.garmin.cn/sso/signin",
"CSS_URL": "https://static.garmincdn.cn/cn.garmin.connect/ui/css/gauth-custom-v1.2-min.css",
"UPLOAD_URL": "https://connectapi.garmin.cn/upload-service/upload/",
"ACTIVITY_URL": "https://connectapi.garmin.cn/activity-service/activity/{activity_id}",
}
Expand Down Expand Up @@ -143,7 +137,7 @@ async def upload_activities_original(self, datas, use_fake_garmin_device=False):

try:
res = await self.req.post(
self.upload_url, files=files, headers={"nk": "NT"}
self.upload_url, files=files, headers=self.headers
)
os.remove(data.filename)
f.close()
Expand Down
8 changes: 0 additions & 8 deletions v2.0_TODO.md

This file was deleted.

0 comments on commit d49d973

Please sign in to comment.