user restriction

This commit is contained in:
Quan HL
2023-11-07 13:20:27 +07:00
parent 6f4012b1d8
commit a12c5bbc3f

View File

@@ -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,