Добавлен вывод QR яндекса

This commit is contained in:
FrigaT
2026-04-19 21:06:36 +03:00
parent 4324b86512
commit 12241639dc
21 changed files with 1349 additions and 46 deletions

View File

@@ -47,7 +47,7 @@ public class YandexSearchController : ControllerBase
user = await _userManager.FindByIdAsync(userId.Value.ToString());
// Если нет пользователя или у него нет токена, пробуем через shared_id
if (user == null || string.IsNullOrEmpty(_yandexService.DecryptToken(user.YandexAccessToken)))
if (user == null || string.IsNullOrEmpty(user.YandexAccessToken))
{
if (string.IsNullOrEmpty(shared_id))
return Unauthorized("Не установлен яндекс токен.");
@@ -63,8 +63,7 @@ public class YandexSearchController : ControllerBase
user = owner;
}
var decryptedToken = _yandexService.DecryptToken(user.YandexAccessToken);
if (string.IsNullOrEmpty(decryptedToken))
if (string.IsNullOrEmpty(user.YandexAccessToken))
return BadRequest(ApiResponse<YandexSearchResult>.Fail(new ErrorResponse
{
StatusCode = 400,