mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix exports
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
BadRequest,
|
||||
} from '../libs/errors';
|
||||
|
||||
module.exports = function blockUser (user, req = {}) {
|
||||
export default function blockUser (user, req = {}) {
|
||||
if (!validator.isUUID(req.params.uuid)) throw new BadRequest(i18n.t('invalidUUID', req.language));
|
||||
if (req.params.uuid === user._id) throw new BadRequest(i18n.t('blockYourself', req.language));
|
||||
|
||||
@@ -19,4 +19,4 @@ module.exports = function blockUser (user, req = {}) {
|
||||
return [
|
||||
user.inbox.blocks,
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user