Optimized imports

- grouped imports and removed obsolete ones
pull/2/head
Trivernis 5 years ago
parent 97ed21e469
commit 43fbb5a6f2

@ -1,12 +1,11 @@
import {GraphQLError} from "graphql";
import * as status from "http-status";
import dataaccess from "../lib/dataaccess";
import {UserNotFoundError} from "../lib/errors/UserNotFoundError";
import {Group} from "../lib/models";
import * as models from "../lib/models";
import {GroupNotFoundGqlError, NotLoggedInGqlError, PostNotFoundGqlError} from "../lib/errors/graphqlErrors";
import {UserNotFoundError} from "../lib/errors/UserNotFoundError";
import globals from "../lib/globals";
import {InternalEvents} from "../lib/InternalEvents";
import * as models from "../lib/models";
import {is} from "../lib/regex";
/**

@ -1,17 +1,4 @@
import * as sqz from "sequelize";
import {
BelongsTo,
BelongsToMany,
Column,
CreatedAt, ForeignKey,
HasMany,
Model,
NotNull,
Table,
Unique,
UpdatedAt,
} from "sequelize-typescript";
import {ChatMessage} from "./ChatMessage";
import {BelongsTo, BelongsToMany, Column, ForeignKey, Model, NotNull, Table,} from "sequelize-typescript";
import {ChatRoom} from "./ChatRoom";
import {GroupAdmin} from "./GroupAdmin";
import {GroupMember} from "./GroupMember";
@ -20,7 +7,7 @@ import {User} from "./User";
@Table({underscored: true})
export class Group extends Model<Group> {
@NotNull
@Column( {allowNull: false})
@Column({allowNull: false})
public name: string;
@NotNull
@ -53,7 +40,7 @@ export class Group extends Model<Group> {
return await this.$get("rAdmins") as User[];
}
public async members({first, offset}: {first: number, offset: number}): Promise<User[]> {
public async members({first, offset}: { first: number, offset: number }): Promise<User[]> {
const limit = first || 10;
offset = offset || 0;
return await this.$get("rMembers", {limit, offset}) as User[];

@ -1,16 +1,4 @@
import * as sqz from "sequelize";
import {
BelongsTo,
BelongsToMany,
Column,
CreatedAt, ForeignKey,
HasMany,
Model, Not,
NotNull,
Table,
Unique,
UpdatedAt,
} from "sequelize-typescript";
import {Column, ForeignKey, Model, NotNull, Table,} from "sequelize-typescript";
import {Group} from "./Group";
import {User} from "./User";

@ -1,16 +1,4 @@
import * as sqz from "sequelize";
import {
BelongsTo,
BelongsToMany,
Column,
CreatedAt, ForeignKey,
HasMany,
Model, Not,
NotNull,
Table,
Unique,
UpdatedAt,
} from "sequelize-typescript";
import {Column, ForeignKey, Model, NotNull, Table,} from "sequelize-typescript";
import {Group} from "./Group";
import {User} from "./User";

Loading…
Cancel
Save