NodeBB/NodeBB

View on GitHub
src/user/info.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function exports has 110 lines of code (exceeds 75 allowed). Consider refactoring.
Open

module.exports = function (User) {
    User.getLatestBanInfo = async function (uid) {
        // Simply retrieves the last record of the user's ban, even if they've been unbanned since then.
        const record = await db.getSortedSetRevRange(`uid:${uid}:bans:timestamp`, 0, 0);
        if (!record.length) {
Severity: Major
Found in src/user/info.js - About 2 hrs to fix

    There are no issues that match your filters.

    Category
    Status