Skip to content

Commit

Permalink
[fix] default to admin tenant, notify developer instead of error later
Browse files Browse the repository at this point in the history
  • Loading branch information
Achoobert committed Jun 13, 2023
1 parent c403e62 commit 34efc46
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions queries/FindRequestUserInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@

module.exports = function (req, AppUUID, tenant) {
return new Promise((resolve, reject) => {
if (!tenant) {
//notify developer
this.AB.notify.developer(
"FindRequestUserInfo: tenant not provided. Defaulting to admin tenant",
{
AppUUID,
}
);
// default to admin tenant
tenant = "admin";
}
let tenantDB = `\`appbuilder-${tenant}\``;
// {string} tenantDB
// the default format for the database name is "appbuilder-[tenantID]"
Expand Down

0 comments on commit 34efc46

Please sign in to comment.