Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Commit

Permalink
testfix :/
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Braud committed May 24, 2018
1 parent 62313f9 commit e16b36a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions lib/storages/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ class LocalAssetStorage extends AssetStorage {
});
}

destination() {
const now = new Date();
let month = now.getMonth() + 1;
month = (month < 10) ? '0' + month : month.toString();
const relativePath = now.getFullYear().toString() + '/' + month;
const asbolutePath = path.join(this.options.dataPath, relativePath);
return new Promise((resolve) => {
mkdirp(asbolutePath, () => resolve({
rel: relativePath,
abs: asbolutePath
}));
});
}
destination () {
const now = new Date();
let month = now.getMonth() + 1;
month = (month < 10) ? '0' + month : month.toString();
const relativePath = now.getFullYear().toString() + '/' + month;
const asbolutePath = path.join(this.options.dataPath, relativePath);
return new Promise((resolve) => {
mkdirp(asbolutePath, () => resolve({
rel: relativePath,
abs: asbolutePath
}));
});
}

getAssetURL (asset) {
return '{}{}'.format(this.options.baseUrl, asset.url);
Expand Down
2 changes: 1 addition & 1 deletion test/config/test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path');
const LocalAssetStorage = require('../../lib/storages/local');
const host = 'http://localhost:3006';
const host = 'http://localhost:3000';
const storageProviders = {
local: new LocalAssetStorage({
name: 'local',
Expand Down

0 comments on commit e16b36a

Please sign in to comment.