From a12c5bbc3f5bc2f22ce37f41e9259c97432892d3 Mon Sep 17 00:00:00 2001 From: Quan HL Date: Tue, 7 Nov 2023 13:20:27 +0700 Subject: [PATCH] user restriction --- lib/register.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/register.js b/lib/register.js index 03e3010..e4e97d8 100644 --- a/lib/register.js +++ b/lib/register.js @@ -31,7 +31,7 @@ async function register(logger, req, res) { contactHdr = contactHdr.replace(/expires=\d+/, `expires=${expires}`); const {lookupClientByAccountAndUsername} = req.srf.locals.dbHelpers; const {account_sid} = req.locals; - const client = await lookupClientByAccountAndUsername(account_sid, uri.user); + const [client] = await lookupClientByAccountAndUsername(account_sid, uri.user); const opts = { contact: req.getParsedHeader('Contact')[0].uri, sbcAddress: req.server.hostport,