Clean up msg_area_list module (standardize/etc.), update and add docs

This commit is contained in:
Bryan Ashby 2018-07-22 19:06:43 -06:00
parent c3bd036509
commit c625d25e2a
6 changed files with 101 additions and 106 deletions

View file

@ -6,6 +6,9 @@ const MenuModule = require('./menu_module.js').MenuModule;
const Errors = require('../core/enig_error.js').Errors;
const ANSI = require('./ansi_term.js');
const Config = require('./config.js').get;
const {
getMessageAreaByTag
} = require('./message_area.js');
// deps
const async = require('async');
@ -104,7 +107,17 @@ exports.getModule = class ShowArtModule extends MenuModule {
}
showByMessageArea(cb) {
return cb(null); // NYI
this.getArtKeyValue( (err, key) => {
if(err) {
return cb(err);
}
const area = getMessageAreaByTag(key);
if(!area) {
return cb(Errors.DoesNotExist(`No area by areaTag ${key} found`));
}
return cb(null); // :TODO: REM OVE ME
});
}
displaySingleArtByConfigPath(configPath, cb) {