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:
@@ -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>) =>
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user