Files
hotelsync/backend/migrations/054_ttlock_fix_api_server.sql
HotelSync 84ead2af99 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>
2026-04-02 11:21:37 +03:00

13 lines
537 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- Исправляем старые значения 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';