fix: pair code timer — expiresAt camelCase after snake→camel transform

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-27 11:11:41 +03:00
parent 4cfa98d7f0
commit 72f8582e97
2 changed files with 2 additions and 2 deletions

View File

@@ -326,7 +326,7 @@ export const api = {
remove: (slug: string, id: string) =>
req<void>('DELETE', `/api/hotels/${slug}/workstations/${id}`),
pairCode: (slug: string, id: string) =>
req<{ code: string; expires_at: string }>('POST', `/api/hotels/${slug}/workstations/${id}/pair-code`),
req<{ code: string; expiresAt: string }>('POST', `/api/hotels/${slug}/workstations/${id}/pair-code`),
listDevices: (slug: string, id: string) =>
req<WorkstationDevice[]>('GET', `/api/hotels/${slug}/workstations/${id}/devices`),
addDevice: (slug: string, id: string, data: Partial<WorkstationDevice>) =>

View File

@@ -71,7 +71,7 @@ function PairCodeModal({
useEffect(() => {
api.workstations.pairCode(slug, workstation.id).then(r => {
setCode(r.code)
setExpiresAt(r.expires_at)
setExpiresAt(r.expiresAt)
setLoading(false)
})
}, [slug, workstation.id])