Showing 1,820 of 4,015 total issues
Function getCountHistory
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getCountHistory() {
const rows = await this.fetchAllStatusDeltas();
// Fetch current total amounts and start counting from there
const totals = await this.getCount();
Function matchAuthors
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
matchAuthors(model, options) {
let ownerUser;
const ops = [];
ops.push(() => {
Function all
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
all(_apiConfig, frame) {
if (frame.options.filter) {
try {
frame.options.filter = nql.parse(frame.options.filter);
} catch (err) {
Function beginCheck
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
beginCheck(context) {
const self = this;
let userPermissionLoad;
let apiKeyPermissionLoad;
let memberPermissionLoad;
Function up
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function up(connection) {
const oldSetting = await connection('settings')
.where('key', 'newsletter_show_header')
.select(['value', 'created_by'])
.first();
Function run
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const run = (postToImport, postIndex, targetProperty, tableName) => {
if (!postToImport[targetProperty] || !postToImport[targetProperty].length) {
return;
}
Function imgUrl
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function imgUrl(requestedImageUrl, options) {
// CASE: if no url is passed, e.g. `{{img_url}}` we show a warning
if (arguments.length < 2) {
logging.warn(tpl(messages.attrIsRequired));
return;
Function fetchData
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fetchData(pathOptions, routerOptions, locals) {
pathOptions = pathOptions || {};
routerOptions = routerOptions || {};
let postQuery = _.cloneDeep(defaultPostQuery);
Function compare
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
compare: function compare(options) {
options = options || {};
const tokenToCompare = options.token;
const parts = exports.resetToken.extract({token: tokenToCompare});
Function fetchPostsFromData
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const fetchPostsFromData = (revueData) => {
const itemData = JSON.parse(revueData.items);
const issueData = papaparse.parse(revueData.issues, {
header: true,
skipEmptyLines: true,
Function edit
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async edit(data: any): Promise<CollectionDTO | null> {
return await this.collectionsRepository.createTransaction(async (transaction) => {
const collection = await this.collectionsRepository.getById(data.id, {transaction});
if (!collection) {
Function _showAPIError
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_showAPIError(resp, options) {
options = options || {};
options.type = options.type || 'error';
// if possible use the title to get a unique key
Function prepareUserMessage
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const prepareUserMessage = function prepareUserMessage(err, req) {
const userError = {
message: err.message,
context: err.context
};
Function _syncRepositoryWithTheme
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async _syncRepositoryWithTheme(name, theme) {
const themeSettings = theme.customSettings || {};
const settingsCollection = await this._repository.browse({filter: `theme:'${name}'`});
let knownSettings = settingsCollection.toJSON();
Function getAction
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getAction(event, options) {
const actor = this.getActor(options);
// @NOTE: we ignore internal updates (`options.context.internal`) for now
if (!actor) {
Function filterExpansions
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
filterExpansions() {
return [{
key: 'label',
replacement: 'labels.slug'
}, {
Function validateRoutes
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_private.validateRoutes = function validateRoutes(routes) {
if (routes.constructor !== Object) {
throw new errors.ValidationError({
message: tpl(messages.validationError, {
at: routes,
Function up
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function up(connection) {
const oldSetting = await connection('settings')
.where('key', 'members_allow_free_signup')
.select('value', 'created_by', 'updated_by')
.first();
Function beforeImport
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
beforeImport() {
debug('beforeImport');
let role;
let lookup = {};
Function up
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function up(knex) {
logging.info('Updating members_status_events for free members');
const freeMemberEvents = await knex('members')
.select(
'members.id as member_id',