mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
* + Rage * tinkering * remove if statement wrapper and modify error message * add test cases * more work on test cases * adding contexts to test cases * test(debug): fix up tests * fix(lint): whisepate --------- Co-authored-by: Sabe Jones <sabe@habitica.com>
13 lines
282 B
JavaScript
13 lines
282 B
JavaScript
import nconf from 'nconf';
|
|
import {
|
|
NotFound,
|
|
} from '../libs/errors';
|
|
|
|
export default function ensureDevelopmentMode (req, res, next) {
|
|
if (nconf.get('DEBUG_ENABLED') && nconf.get('BASE_URL') !== 'https://habitica.com') {
|
|
next();
|
|
} else {
|
|
next(new NotFound());
|
|
}
|
|
}
|