0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Optimised doAuth options preparation

refs #9866
This commit is contained in:
kirrg001 2018-10-05 16:17:34 +02:00 committed by Katharina Irrgang
parent 353f5d9181
commit 5e838cf3db

View file

@ -114,12 +114,9 @@ const doAuth = (apiOptions) => {
return function doAuthInner() {
let API_URL = arguments[0];
let request = arguments[1];
let options = arguments;
let fixtureOps;
// Remove API_URL & request from this list
delete options[0];
delete options[1];
let options = Array.prototype.slice.call(arguments, 2);
// No DB setup, but override the owner
options = _.merge({'owner:post': true}, _.transform(options, function (result, val) {
@ -128,7 +125,7 @@ const doAuth = (apiOptions) => {
}
}));
fixtureOps = apiOptions.getFixtureOps(options);
const fixtureOps = apiOptions.getFixtureOps(options);
return sequence(fixtureOps).then(function () {
return login(request, API_URL);