Skip to content

Commit

Permalink
refactor(dmuse): move usage info to dmuse/get.js
Browse files Browse the repository at this point in the history
and simplify code
  • Loading branch information
drawnepicenter committed Aug 25, 2016
1 parent 01bd9f0 commit ce2130f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions build/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,10 @@ exports.limitDmuse = function (config) {
reset = true;
c.dmuse.date.stamp = new Date().toJSON();
c.dmuse.date.remain = c.dmuse.date.limit;
console.log(chalk.white('Reset API limit to ' + c.dmuse.date.limit + '/' + c.dmuse.date.interval + '.'));
c.dmuse.date.remain--;
noon.save(CFILE, c);
}
if (c.dmuse.date.remain === 0) {
proceed = false;
} else if (c.dmuse.date.remain < 0) {
if (c.dmuse.date.remain <= 0) {
proceed = false;
c.dmuse.date.remain = 0;
noon.save(CFILE, c);
Expand Down
5 changes: 1 addition & 4 deletions src/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,10 @@ exports.limitDmuse = (config) => {
reset = true
c.dmuse.date.stamp = new Date().toJSON()
c.dmuse.date.remain = c.dmuse.date.limit
console.log(chalk.white(`Reset API limit to ${c.dmuse.date.limit}/${c.dmuse.date.interval}.`))
c.dmuse.date.remain--
noon.save(CFILE, c)
}
if (c.dmuse.date.remain === 0) {
proceed = false
} else if (c.dmuse.date.remain < 0) {
if (c.dmuse.date.remain <= 0) {
proceed = false
c.dmuse.date.remain = 0
noon.save(CFILE, c)
Expand Down

0 comments on commit ce2130f

Please sign in to comment.