mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 05:37:22 +01:00
lint: Correct linting errors
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
||||
isEmpty,
|
||||
set,
|
||||
} from 'lodash';
|
||||
import { MongoClient as mongo } from 'mongodb';
|
||||
|
||||
class ApiObject {
|
||||
constructor (options) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable no-use-before-define */
|
||||
|
||||
import { MongoClient as mongo } from 'mongodb';
|
||||
|
||||
const DB_URI = 'mongodb://localhost/habitrpg_test';
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
/* eslint-disable no-use-before-define */
|
||||
|
||||
import superagent from 'superagent';
|
||||
|
||||
const API_TEST_SERVER_PORT = 3003;
|
||||
var apiVersion;
|
||||
let apiVersion;
|
||||
|
||||
// Sets up an abject that can make all REST requests
|
||||
// If a user is passed in, the uuid and api token of
|
||||
@@ -17,7 +19,7 @@ export function requester (user = {}, additionalSets) {
|
||||
|
||||
requester.setApiVersion = (version) => {
|
||||
apiVersion = version;
|
||||
}
|
||||
};
|
||||
|
||||
function _requestMaker (user, method, additionalSets) {
|
||||
if (!apiVersion) throw new Error('apiVersion not set');
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/* eslint-disable no-use-before-define */
|
||||
|
||||
// Import requester function, set it up for v2, export it
|
||||
import { requester } from '../requester'
|
||||
import { requester } from '../requester';
|
||||
requester.setApiVersion('v2');
|
||||
export { requester };
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import {
|
||||
each,
|
||||
times,
|
||||
} from 'lodash';
|
||||
import Q from 'q';
|
||||
import { v4 as generateUUID } from 'uuid';
|
||||
import { ApiUser, ApiGroup } from '../api-classes';
|
||||
import { requester } from '../requester'
|
||||
import { requester } from '../requester';
|
||||
|
||||
// Creates a new user and returns it
|
||||
// If you need the user to have specific requirements,
|
||||
|
||||
Reference in New Issue
Block a user