Skip to content

Commit

Permalink
Merge pull request #5628 from Countly/anna/next
Browse files Browse the repository at this point in the history
Anna/next
  • Loading branch information
Cookiezaurs authored Oct 3, 2024
2 parents cc4f7b4 + dda7613 commit e3f1c05
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion api/utils/requestProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2130,8 +2130,16 @@ const processRequest = (params) => {

dbUserHasAccessToCollection(params, params.qstring.collection, (hasAccess) => {
if (hasAccess) {
var dbs = { countly: common.db, countly_drill: common.drillDb, countly_out: common.outDb, countly_fs: countlyFs.gridfs.getHandler() };
var db = "";
if (params.qstring.db && dbs[params.qstring.db]) {
db = dbs[params.qstring.db];
}
else {
db = common.db;
}
countlyApi.data.exports.fromDatabase({
db: (params.qstring.db === "countly_drill") ? common.drillDb : (params.qstring.dbs === "countly_drill") ? common.drillDb : common.db,
db: db,
params: params,
collection: params.qstring.collection,
query: params.qstring.query,
Expand Down

0 comments on commit e3f1c05

Please sign in to comment.