move owners store out to own object

This commit is contained in:
AJ ONeal 2017-04-27 19:46:54 -06:00
parent c7627faffd
commit f2b05ee7af
1 changed files with 46 additions and 44 deletions

View File

@ -55,11 +55,7 @@ module.exports = function (deps, conf, overrideHttp) {
var scmp = require('scmp'); var scmp = require('scmp');
request = request || PromiseA.promisify(require('request')); request = request || PromiseA.promisify(require('request'));
return require('../packages/apis/com.daplie.goldilocks').create({ var owners = {
PromiseA: PromiseA
, OAUTH3: OAUTH3
, storage: {
owners: {
all: function () { all: function () {
var owners; var owners;
try { try {
@ -102,7 +98,13 @@ module.exports = function (deps, conf, overrideHttp) {
return fs.writeFileAsync(ownersPath, JSON.stringify(owners), 'utf8'); return fs.writeFileAsync(ownersPath, JSON.stringify(owners), 'utf8');
} }
} };
return require('../packages/apis/com.daplie.goldilocks').create({
PromiseA: PromiseA
, OAUTH3: OAUTH3
, storage: {
owners: owners
} }
, recase: require('recase').create({}) , recase: require('recase').create({})
, request: request , request: request