mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-01 07:26:10 +02:00
Work on using UserProps, fix up ISO timestamps, etc.
This commit is contained in:
parent
4bd340a480
commit
b82c640014
10 changed files with 95 additions and 50 deletions
|
@ -14,6 +14,7 @@ const resolveMimeType = require('./mime_util.js').resolveMimeType;
|
|||
const stringFormat = require('./string_format.js');
|
||||
const wordWrapText = require('./word_wrap.js').wordWrapText;
|
||||
const StatLog = require('./stat_log.js');
|
||||
const UserProps = require('./user_property.js');
|
||||
|
||||
// deps
|
||||
const _ = require('lodash');
|
||||
|
@ -136,11 +137,11 @@ function changeFileAreaWithOptions(client, areaTag, options, cb) {
|
|||
},
|
||||
function changeArea(area, callback) {
|
||||
if(true === options.persist) {
|
||||
client.user.persistProperty('file_area_tag', areaTag, err => {
|
||||
client.user.persistProperty(UserProps.FileAreaTag, areaTag, err => {
|
||||
return callback(err, area);
|
||||
});
|
||||
} else {
|
||||
client.user.properties['file_area_tag'] = areaTag;
|
||||
client.user.properties[UserProps.FileAreaTag] = areaTag;
|
||||
return callback(null, area);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue