don't let UI close door when calling auth
All checks were successful
Build and push image for doorman-homeassistant / diff (push) Successful in 14s
Build and push Doorman UI / API / diff (push) Successful in 13s
Build and push image for doorman-homeassistant / docker (push) Has been skipped
Build and push image for doorman-homeassistant / deploy-gitainer (push) Has been skipped
Build and push Doorman UI / API / twilio (push) Successful in 2m36s

This commit is contained in:
Martin Dimitrov 2025-10-31 16:42:00 -07:00
parent 8a84369fc7
commit 94c42075f7

View File

@ -68,7 +68,7 @@ export const handler: ServerlessFunctionSignature<TwilioContext, AuthRequestTwil
const fingerprint = { const fingerprint = {
method, method,
userAgent: event.request.headers['user-agent'], userAgent: event.request.headers['user-agent'],
ip: event.ip, ip: req.ip,
}; };
// take timeout from the query string // take timeout from the query string
@ -78,7 +78,7 @@ export const handler: ServerlessFunctionSignature<TwilioContext, AuthRequestTwil
const lock = await db.entities.lockStatus.findById(getLockStatusID(door)); const lock = await db.entities.lockStatus.findById(getLockStatusID(door));
const isOpen = isLockOpen(lock); const isOpen = isLockOpen(lock);
if (isOpen && lock) { if (isOpen && lock && !req.ip) {
const fingerprint = JSON.parse(lock.fingerprint); const fingerprint = JSON.parse(lock.fingerprint);
setResponseJson(response, 200, { setResponseJson(response, 200, {