fix: add logs for the ping to refresh tokens

fix/add-ping-user-logs
OwsleyJr 2 months ago
parent 19461574f2
commit 5c014d93ba

@ -19,5 +19,11 @@
"typescript.preferences.importModuleSpecifier": "non-relative",
"files.associations": {
"globals.css": "tailwindcss"
}
},
"i18n-ally.localesPaths": [
"src/i18n",
"src/i18n/locale",
"src/pages/discover/movies/language",
"src/pages/discover/tv/language"
]
}

@ -365,7 +365,7 @@ class PlexTvAPI extends ExternalAPI {
}
}
public async pingToken() {
public async pingToken(displayName: string): Promise<void> {
try {
const response = await this.axios.get('/api/v2/ping', {
headers: {
@ -379,6 +379,7 @@ class PlexTvAPI extends ExternalAPI {
logger.error('Failed to ping token', {
label: 'Plex Refresh Token',
errorMessage: e.message,
user: displayName,
});
}
}

@ -28,7 +28,7 @@ class RefreshToken {
}
const plexTvApi = new PlexTvAPI(user.plexToken);
plexTvApi.pingToken();
plexTvApi.pingToken(user.displayName);
}
}

Loading…
Cancel
Save