mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-27 05:29:59 +00:00
12 lines
287 B
JavaScript
12 lines
287 B
JavaScript
import nconf from 'nconf';
|
|
import {
|
|
NotFound,
|
|
} from '../libs/errors';
|
|
|
|
export default function ensureTimeTravelMode (req, res, next) {
|
|
if (nconf.get('TIME_TRAVEL_ENABLED') && nconf.get('BASE_URL') !== 'https://habitica.com') {
|
|
next();
|
|
} else {
|
|
next(new NotFound());
|
|
}
|
|
}
|