summary refs log tree commit diff
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-07-18 19:05:43 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-09 23:28:27 +0200
commit450e7d93783b60b3481ae9c6ee2ea05f1315b785 (patch)
treeb2c0f155ecf43104b6e2d37875175178d83fa294
parentUpdate local state, fix a few more errors (diff)
downloadserver-450e7d93783b60b3481ae9c6ee2ea05f1315b785.tar.xz
Update FindConditions => FindOptionsWhere in BaseClass
-rw-r--r--util/src/entities/BaseClass.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/src/entities/BaseClass.ts b/util/src/entities/BaseClass.ts
index aabca016..9f23de7c 100644
--- a/util/src/entities/BaseClass.ts
+++ b/util/src/entities/BaseClass.ts
@@ -1,5 +1,5 @@
 import "reflect-metadata";
-import { BaseEntity, EntityMetadata, FindConditions, ObjectIdColumn, PrimaryColumn } from "typeorm";
+import { BaseEntity, EntityMetadata, ObjectIdColumn, PrimaryColumn, FindOptionsWhere } from "typeorm";
 import { Snowflake } from "../util/Snowflake";
 import "missing-native-js-functions";
 
@@ -50,14 +50,14 @@ export class BaseClassWithoutId extends BaseEntity {
 		);
 	}
 
-	static increment<T extends BaseClass>(conditions: FindConditions<T>, propertyPath: string, value: number | string) {
+	static increment<T extends BaseClass>(conditions: FindOptionsWhere<T>, propertyPath: string, value: number | string) {
 		const repository = this.getRepository();
-		return repository.increment(conditions as T, propertyPath, value);
+		return repository.increment(conditions, propertyPath, value);
 	}
 
-	static decrement<T extends BaseClass>(conditions: FindConditions<T>, propertyPath: string, value: number | string) {
+	static decrement<T extends BaseClass>(conditions: FindOptionsWhere<T>, propertyPath: string, value: number | string) {
 		const repository = this.getRepository();
-		return repository.decrement(conditions as T, propertyPath, value);
+		return repository.decrement(conditions, propertyPath, value);
 	}
 }