Code cleanup

pull/2/head
Trivernis 5 years ago
parent 580f15da3d
commit 7785a118f2

@ -1,4 +1,3 @@
import {AggregateError} from "bluebird";
import {GraphQLError} from "graphql";
import * as status from "http-status";
import dataaccess from "../lib/dataaccess";

@ -1,3 +1,6 @@
/**
* Events that are emitted and processsed internally on the server
*/
export enum InternalEvents {
CHATCREATE = "chatCreate",
CHATMESSAGE = "chatMessage",

@ -1,10 +1,3 @@
/**
* @author Trivernis
* @remarks
*
* Taken from {@link https://github.com/Trivernis/whooshy}
*/
import {Router} from "express";
import {Namespace, Server} from "socket.io";

@ -1,10 +1,8 @@
import * as crypto from "crypto";
import * as status from "http-status";
import * as sqz from "sequelize";
import {Sequelize} from "sequelize-typescript";
import {ChatNotFoundError} from "./errors/ChatNotFoundError";
import {EmailAlreadyRegisteredError} from "./errors/EmailAlreadyRegisteredError";
import {GroupNotFoundGqlError, NotLoggedInGqlError} from "./errors/graphqlErrors";
import {GroupNotFoundError} from "./errors/GroupNotFoundError";
import {InvalidLoginError} from "./errors/InvalidLoginError";
import {NoActionSpecifiedError} from "./errors/NoActionSpecifiedError";

@ -1,14 +1,8 @@
/**
* @author Trivernis
* @remarks
*
* Partly taken from {@link https://github.com/Trivernis/whooshy}
*/
import {EventEmitter} from "events";
import * as fsx from "fs-extra";
import * as yaml from "js-yaml";
import * as winston from "winston";
require("winston-daily-rotate-file");
const configPath = "config.yaml";

@ -11,8 +11,12 @@ export enum RequestType {
@Table({underscored: true})
export class Request extends Model<Request> {
@NotNull
@Column({type: sqz.ENUM, values: ["FRIENDREQUEST", "GROUPINVITE", "EVENTINVITE"],
defaultValue: "FRIENDREQUEST", allowNull: false})
@Column({
allowNull: false,
defaultValue: "FRIENDREQUEST",
type: sqz.ENUM,
values: ["FRIENDREQUEST", "GROUPINVITE", "EVENTINVITE"],
})
public requestType: RequestType;
@ForeignKey(() => User)

@ -1,6 +1,5 @@
import * as sqz from "sequelize";
import {
BelongsTo,
BelongsToMany,
Column,
CreatedAt,

Loading…
Cancel
Save