mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-22 18:56:00 +02:00
Clean up msg_area_list module (standardize/etc.), update and add docs
This commit is contained in:
parent
c3bd036509
commit
c625d25e2a
6 changed files with 101 additions and 106 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue