summary refs log tree commit diff
path: root/util/src/entities/Relationship.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-29 00:03:58 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-29 00:03:58 +0200
commit227a4e47f1ec9bca9b039c7c6761a335bcf622c2 (patch)
tree356056aa999e2b7b2d8b2e5094c98e63fa1bd2d2 /util/src/entities/Relationship.ts
parent:sparkles: typeorm api rewrite done (diff)
downloadserver-227a4e47f1ec9bca9b039c7c6761a335bcf622c2.tar.xz
:sparkles: update util
Diffstat (limited to 'util/src/entities/Relationship.ts')
-rw-r--r--util/src/entities/Relationship.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/src/entities/Relationship.ts b/util/src/entities/Relationship.ts
index 3e1280c7..cf3624bf 100644
--- a/util/src/entities/Relationship.ts
+++ b/util/src/entities/Relationship.ts
@@ -1,4 +1,4 @@
-import { Column, Entity, JoinColumn, ManyToOne, OneToMany, RelationId } from "typeorm";
+import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm";
 import { BaseClass } from "./BaseClass";
 import { User } from "./User";
 
@@ -15,10 +15,10 @@ export class Relationship extends BaseClass {
 	user_id: string;
 
 	@JoinColumn({ name: "user_id" })
-	@ManyToOne(() => User, (user: User) => user.id)
+	@ManyToOne(() => User, (user: User) => user.relationships)
 	user: User;
 
-	@Column()
+	@Column({ nullable: true })
 	nickname?: string;
 
 	@Column({ type: "simple-enum", enum: RelationshipType })