Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Commit 097ee91

Browse files
committed
refactor: remove yandex auth callback
1 parent 5e6af57 commit 097ee91

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

nowplaying/platforms/yandex.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from collections.abc import AsyncIterator
22
from datetime import datetime, timedelta
33
from types import MappingProxyType
4-
from urllib.parse import urlencode
54

65
from yandex_music.exceptions import TimedOutError, YandexMusicError
76

@@ -118,5 +117,5 @@ async def from_telegram_id(self, telegram_id: int) -> PlatformClientABC:
118117
raise ValueError(err_msg)
119118
return YandexClient(ClientAsync(token), telegram_id)
120119

121-
async def get_authorization_url(self, state: str) -> str:
120+
async def get_authorization_url(self, _: str) -> str:
122121
return f'{config.WEB_SERVER_PUBLIC_ENDPOINT}/ym/'

nowplaying/routes/ext.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from nowplaying.core.config import config
66
from nowplaying.core.sign import verify_sign
77
from nowplaying.enums.start_actions import StartAction
8-
from nowplaying.platforms import PlatformABC, apple, lastfm, spotify, yandex
8+
from nowplaying.platforms import PlatformABC, apple, lastfm, spotify
99
from nowplaying.util.http import STATUS_FORBIDDEN, STATUS_TEMPORARY_REDIRECT
1010

1111

@@ -33,11 +33,6 @@ async def lastfm_callback(state: str, token: str) -> RedirectResponse:
3333
return await _proceed_auth(lastfm, state, token)
3434

3535

36-
@router.get('/yandex/callback')
37-
async def yandex_callback(state: str, access_token: str) -> RedirectResponse:
38-
return await _proceed_auth(yandex, state, access_token)
39-
40-
4136
@router.get('/apple/callback')
4237
async def apple_callback(state: str, token: str) -> RedirectResponse:
4338
return await _proceed_auth(apple, state, token)

0 commit comments

Comments
 (0)