fix: TTLock — correct OAuth server (api.sciener.com) and API servers (euapi/cnapi)

- OAuth token: always https://api.sciener.com/oauth2/token (was euopen.ttlock.com = wrong)
- EU API: https://euapi.ttlock.com/v3/... (was euopen.ttlock.com)
- CN API: https://cnapi.ttlock.com/v3/... (was open.ttlock.com)
- Migration 054: update existing DB records with old server URLs
- UI: update radio button values to correct server names

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-02 11:21:37 +03:00
parent ee7e515f61
commit 84ead2af99
3 changed files with 21 additions and 9 deletions

View File

@@ -0,0 +1,12 @@
-- Исправляем старые значения api_server: euopen.ttlock.com → euapi.ttlock.com
-- (euopen — это веб-портал разработчиков, а не API-сервер)
UPDATE hotel_ttlock_config
SET api_server = 'https://euapi.ttlock.com'
WHERE api_server = 'https://euopen.ttlock.com';
UPDATE hotel_ttlock_config
SET api_server = 'https://cnapi.ttlock.com'
WHERE api_server = 'https://open.ttlock.com';
ALTER TABLE hotel_ttlock_config
ALTER COLUMN api_server SET DEFAULT 'https://euapi.ttlock.com';