Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

adding changes that were made directly to the api instance #471

Merged
merged 1 commit into from
May 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion actions/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ function getUserIdentityByAuth0Id(api, connection, next) {
function (cb) {
try {
var splits = auth0id.split('|');
if (splits[0] === 'ad') {
if (splits[0] === 'ad' || splits[0] === 'auth0') {
cb(null, [{ user_id: Number(splits[1]) }]);
} else {
api.helper.getProviderId(splits[0], function (err, provider) {
Expand Down
4 changes: 2 additions & 2 deletions config/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports.default = {
logger.transports.push(function (api, winston) {
return new (winston.transports.Console)({
colorize: true,
level: 'debug',
level: 'info',
timestamp: api.utils.sqlDateTime,
json: false
});
Expand All @@ -31,7 +31,7 @@ exports.default = {
logger.transports.push(function (api, winston) {
return new (winston.transports.File)({
filename: api.config.general.paths.log[0] + '/actionhero-worker.log',
level: 'debug',
level: 'info',
colorize: true,
timestamp: api.utils.sqlDateTime,
json: false
Expand Down
7 changes: 5 additions & 2 deletions initializers/dataAccess.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,13 @@ exports.dataAccess = function (api, next) {
return;
}

sql = queries[queryName].sql;
sql = queries[queryName].sql;

if (!isSafeToUseJavaBridge(sql) || !api.helper.readTransaction) {
connection = connectionMap[queries[queryName].db];
api.log("######### MD #########", "info");
api.log(JSON.stringify(connectionMap), "info");
api.log(queryName, "info");
error = helper.checkObject(connection, "connection");
}

Expand Down Expand Up @@ -374,4 +377,4 @@ exports.dataAccess = function (api, next) {
}
};
next();
};
};
2 changes: 1 addition & 1 deletion initializers/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ helper.getProviderId = function (provider, callback) {
if (provider.startsWith("salesforce")) {
providerId = helper.socialProviders.salesforce;
}
if (provider.startsWith("ad")) {
if (provider.startsWith("ad") || provider.startsWith("auth0")) {
providerId = helper.socialProviders.ad;
}
if (providerId) {
Expand Down