summary refs log tree commit diff
path: root/util/src
diff options
context:
space:
mode:
Diffstat (limited to 'util/src')
-rw-r--r--util/src/entities/Channel.ts2
-rw-r--r--util/src/entities/Guild.ts2
-rw-r--r--util/src/entities/Member.ts2
-rw-r--r--util/src/entities/User.ts6
4 files changed, 6 insertions, 6 deletions
diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts
index 35f1956c..92940b34 100644
--- a/util/src/entities/Channel.ts
+++ b/util/src/entities/Channel.ts
@@ -1,5 +1,5 @@
 import { Column, Entity, JoinColumn, ManyToOne, OneToMany, RelationId } from "typeorm";

-import { OrmUtils } from "typeorm/util/OrmUtils";

+import { OrmUtils } from "../util/imports/OrmUtils";

 import { BaseClass } from "./BaseClass";

 import { Guild } from "./Guild";

 import { PublicUserProjection, User } from "./User";

diff --git a/util/src/entities/Guild.ts b/util/src/entities/Guild.ts
index c314ecb9..77a04350 100644
--- a/util/src/entities/Guild.ts
+++ b/util/src/entities/Guild.ts
@@ -1,5 +1,5 @@
 import { Column, Entity, JoinColumn, ManyToMany, ManyToOne, OneToMany, OneToOne, RelationId } from "typeorm";
-import { OrmUtils } from "typeorm/util/OrmUtils";
+import { OrmUtils } from "../util/imports/OrmUtils";
 import { Config, handleFile, Snowflake } from "..";
 import { Ban } from "./Ban";
 import { BaseClass } from "./BaseClass";
diff --git a/util/src/entities/Member.ts b/util/src/entities/Member.ts
index c356c26d..d4395e03 100644
--- a/util/src/entities/Member.ts
+++ b/util/src/entities/Member.ts
@@ -25,7 +25,7 @@ import { Role } from "./Role";
 import { BaseClassWithoutId } from "./BaseClass";
 import { Ban, PublicGuildRelations } from ".";
 import { DiscordApiErrors } from "../util/Constants";
-import { OrmUtils } from "typeorm/util/OrmUtils";
+import { OrmUtils } from "../util/imports/OrmUtils";
 
 export const MemberPrivateProjection: (keyof Member)[] = [
 	"id",
diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts
index 7cd6c3d8..7e3c7457 100644
--- a/util/src/entities/User.ts
+++ b/util/src/entities/User.ts
@@ -1,5 +1,5 @@
 import { Column, Entity, FindOneOptions, FindOptionsSelectByString, JoinColumn, OneToMany } from "typeorm";
-import { OrmUtils } from "typeorm/util/OrmUtils";
+import { OrmUtils } from "../util/imports/OrmUtils";
 import { BaseClass } from "./BaseClass";
 import { BitField } from "../util/BitField";
 import { Relationship } from "./Relationship";
@@ -245,7 +245,7 @@ export class User extends BaseClass {
 			throw FieldErrors({
 				username: {
 					code: "USERNAME_TOO_MANY_USERS",
-					message: req.t("auth:register.USERNAME_TOO_MANY_USERS"),
+					message: req?.t("auth:register.USERNAME_TOO_MANY_USERS"),
 				},
 			});
 		}
@@ -253,7 +253,7 @@ export class User extends BaseClass {
 		// TODO: save date_of_birth
 		// appearently discord doesn't save the date of birth and just calculate if nsfw is allowed
 		// if nsfw_allowed is null/undefined it'll require date_of_birth to set it to true/false
-		const language = req.language === "en" ? "en-US" : req.language || "en-US";
+		const language = req?.language === "en" ? "en-US" : req?.language || "en-US";
 
 		const user = OrmUtils.mergeDeep(new User(), {
 			created_at: new Date(),