diff options
author | Catalan Lover <48515417+FSG-Cat@users.noreply.github.com> | 2022-08-23 23:50:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 23:50:01 +0200 |
commit | d63451b3fe6c0c6ab175adec82361834bb3633f5 (patch) | |
tree | b738ee25bf9819300e1802ba9a8e2813e9dc2588 /src/util/entities/Session.ts | |
parent | Merge pull request #1 from FSG-Cat/FSG-Cat-patch-1 (diff) | |
parent | Check Captcha (diff) | |
download | server-d63451b3fe6c0c6ab175adec82361834bb3633f5.tar.xz |
Merge branch 'fosscord:staging' into Bug-Report-Template
Diffstat (limited to 'src/util/entities/Session.ts')
-rw-r--r-- | src/util/entities/Session.ts | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/util/entities/Session.ts b/src/util/entities/Session.ts index 969efa89..0cb4c309 100644 --- a/src/util/entities/Session.ts +++ b/src/util/entities/Session.ts @@ -1,8 +1,8 @@ -import { User } from "./User"; -import { BaseClass } from "./BaseClass"; import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm"; -import { Status } from "../interfaces/Status"; import { Activity } from "../interfaces/Activity"; +import { Status } from "../interfaces/Status"; +import { BaseClass } from "./BaseClass"; +import { User } from "./User"; //TODO we need to remove all sessions on server start because if the server crashes without closing websockets it won't delete them @@ -14,7 +14,7 @@ export class Session extends BaseClass { @JoinColumn({ name: "user_id" }) @ManyToOne(() => User, { - onDelete: "CASCADE", + onDelete: "CASCADE" }) user: User; @@ -37,10 +37,4 @@ export class Session extends BaseClass { status: Status; //TODO enum } -export const PrivateSessionProjection: (keyof Session)[] = [ - "user_id", - "session_id", - "activities", - "client_info", - "status", -]; +export const PrivateSessionProjection: (keyof Session)[] = ["user_id", "session_id", "activities", "client_info", "status"]; |