mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
feat client direct call from registration webhook (#562)
* feat client direct call from registration webhook * feat client direct call from registration webhook * wip
This commit is contained in:
@@ -52,10 +52,16 @@ module.exports = function(srf, logger) {
|
||||
let clientDb = null;
|
||||
if (req.has('X-Authenticated-User')) {
|
||||
req.locals.originatingUser = req.get('X-Authenticated-User');
|
||||
let clientSettings;
|
||||
const arr = /^(.*)@(.*)/.exec(req.locals.originatingUser);
|
||||
if (arr) {
|
||||
[clientDb] = await lookupClientByAccountAndUsername(account_sid, arr[1]);
|
||||
[clientSettings] = await lookupClientByAccountAndUsername(account_sid, arr[1]);
|
||||
}
|
||||
clientDb = await registrar.query(req.locals.originatingUser);
|
||||
clientDb = {
|
||||
...clientDb,
|
||||
...clientSettings,
|
||||
};
|
||||
}
|
||||
|
||||
// check for call to application
|
||||
|
||||
Reference in New Issue
Block a user