mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
start upgrading eslint
This commit is contained in:
@@ -11,10 +11,10 @@ import content from '../content/index';
|
||||
function markNotificationAsRead (user, cardType) {
|
||||
const indexToRemove = user.notifications.findIndex(notification => {
|
||||
if (
|
||||
notification &&
|
||||
notification.type === 'CARD_RECEIVED' &&
|
||||
notification.data &&
|
||||
notification.data.card === cardType
|
||||
notification
|
||||
&& notification.type === 'CARD_RECEIVED'
|
||||
&& notification.data
|
||||
&& notification.data.card === cardType
|
||||
) return true;
|
||||
});
|
||||
|
||||
@@ -23,7 +23,7 @@ function markNotificationAsRead (user, cardType) {
|
||||
|
||||
|
||||
export default function readCard (user, req = {}) {
|
||||
let cardType = get(req.params, 'cardType');
|
||||
const cardType = get(req.params, 'cardType');
|
||||
|
||||
if (!cardType) {
|
||||
throw new BadRequest(i18n.t('cardTypeRequired', req.language));
|
||||
@@ -40,6 +40,6 @@ export default function readCard (user, req = {}) {
|
||||
|
||||
return [
|
||||
{ specialItems: user.items.special, cardReceived: user.flags.cardReceived },
|
||||
i18n.t('readCard', {cardType}, req.language),
|
||||
i18n.t('readCard', { cardType }, req.language),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user