const { ListResponse } = require("../../../utils/ListResponse");

exports.UserAreaCollection = (req, res, data = [], total = null, page = 1, limit = 10, message = 'Success') => {
    if (typeof total !== 'number') {
        return res.status(200).json({
            success: true,
            message,
            data: Array.isArray(data)
        });
    }

    return ListResponse({ req, res, data, total, page, limit, message });
};