summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-03-31 01:21:40 +1100
committerGitHub <noreply@github.com>2022-03-30 17:21:40 +0300
commit40f08ed76c35daea8a1e743d2076e27ea4d7e40f (patch)
tree3c4c6d6d66a11fe25382edb9682f0ecdc1f42624
parentMerge pull request #705 from fosscord/dependabot/npm_and_yarn/bundle/minimist... (diff)
downloadserver-40f08ed76c35daea8a1e743d2076e27ea4d7e40f.tar.xz
Fix typo in table 'client_relase' -> 'client_release' ( and other of the same typo ) (#703)
* Fixed typo in table name 'client_relase' -> 'client_release'. Fixed more typos of the same typo.

* Fixed migration ( but dirty lol )
-rw-r--r--api/scripts/droptables.sql2
-rw-r--r--api/src/routes/downloads.ts6
-rw-r--r--api/src/routes/store/published-listings/applications.ts2
-rw-r--r--api/src/routes/store/published-listings/skus.ts2
-rw-r--r--api/src/routes/updates.ts12
-rw-r--r--bundle/package.json2
-rw-r--r--util/src/entities/ClientRelease.ts (renamed from util/src/entities/ClientRelase.ts)4
-rw-r--r--util/src/entities/Config.ts10
-rw-r--r--util/src/entities/index.ts2
-rw-r--r--util/src/migrations/1648643945733-ReleaseTypo.ts16
10 files changed, 37 insertions, 21 deletions
diff --git a/api/scripts/droptables.sql b/api/scripts/droptables.sql
index 57d1b271..8a852048 100644
--- a/api/scripts/droptables.sql
+++ b/api/scripts/droptables.sql
@@ -26,6 +26,6 @@ DROP TABLE webhooks;
 DROP TABLE channels;
 DROP TABLE members;
 DROP TABLE guilds;
-DROP TABLE client_relase;
+DROP TABLE client_release;
 -- DROP TABLE users;
 -- DROP TABLE config;
\ No newline at end of file
diff --git a/api/src/routes/downloads.ts b/api/src/routes/downloads.ts
index ad78b62f..ddfc080c 100644
--- a/api/src/routes/downloads.ts
+++ b/api/src/routes/downloads.ts
@@ -1,6 +1,6 @@
 import { Router, Response, Request } from "express";
 import { route } from "@fosscord/api";
-import { Relase, Config } from "@fosscord/util";
+import { Release, Config } from "@fosscord/util";
 
 const router = Router();
 
@@ -12,9 +12,9 @@ router.get("/:branch", route({}), async (req: Request, res: Response) => {
 
 	if(!platform || !["linux", "osx", "win"].includes(platform.toString())) return res.status(404)
 
-	const relase = await Relase.findOneOrFail({ name: client.relases.upstreamVersion });
+	const release = await Release.findOneOrFail({ name: client.releases.upstreamVersion });
 
-	res.redirect(relase[`win_url`]);
+	res.redirect(release[`win_url`]);
 });
 
 export default router;
diff --git a/api/src/routes/store/published-listings/applications.ts b/api/src/routes/store/published-listings/applications.ts
index f06a01e4..060a4c3d 100644
--- a/api/src/routes/store/published-listings/applications.ts
+++ b/api/src/routes/store/published-listings/applications.ts
@@ -18,7 +18,7 @@ router.get("/:id", route({}), async (req: Request, res: Response) => {
 			access_type: 2,
 			name: "",
 			features: [],
-			relase_date: "",
+			release_date: "",
 			premium: false,
 			slug: "",
 			flags: 4,
diff --git a/api/src/routes/store/published-listings/skus.ts b/api/src/routes/store/published-listings/skus.ts
index f06a01e4..060a4c3d 100644
--- a/api/src/routes/store/published-listings/skus.ts
+++ b/api/src/routes/store/published-listings/skus.ts
@@ -18,7 +18,7 @@ router.get("/:id", route({}), async (req: Request, res: Response) => {
 			access_type: 2,
 			name: "",
 			features: [],
-			relase_date: "",
+			release_date: "",
 			premium: false,
 			slug: "",
 			flags: 4,
diff --git a/api/src/routes/updates.ts b/api/src/routes/updates.ts
index 4682ce7c..cb4577c8 100644
--- a/api/src/routes/updates.ts
+++ b/api/src/routes/updates.ts
@@ -1,19 +1,19 @@
 import { Router, Response, Request } from "express";
 import { route } from "@fosscord/api";
-import { Config, Relase } from "@fosscord/util";
+import { Config, Release } from "@fosscord/util";
 
 const router = Router();
 
 router.get("/", route({}), async (req: Request, res: Response) => {
 	const { client } = Config.get();
 
-    const relase = await Relase.findOneOrFail({ name: client.relases.upstreamVersion})
+    const release = await Release.findOneOrFail({ name: client.releases.upstreamVersion})
 
 	res.json({
-        name: relase.name,
-        pub_date: relase.pub_date,
-        url: relase.url,
-        notes: relase.notes
+        name: release.name,
+        pub_date: release.pub_date,
+        url: release.url,
+        notes: release.notes
     });
 });
 
diff --git a/bundle/package.json b/bundle/package.json
index 3754a3bf..7d68427f 100644
--- a/bundle/package.json
+++ b/bundle/package.json
@@ -111,4 +111,4 @@
 		"typescript-json-schema": "^0.50.1",
 		"ws": "^7.4.2"
 	}
-}
+}
\ No newline at end of file
diff --git a/util/src/entities/ClientRelase.ts b/util/src/entities/ClientRelease.ts
index e021b82b..c5afd307 100644
--- a/util/src/entities/ClientRelase.ts
+++ b/util/src/entities/ClientRelease.ts
@@ -1,8 +1,8 @@
 import { Column, Entity} from "typeorm";
 import { BaseClass } from "./BaseClass";
 
-@Entity("client_relase")
-export class Relase extends BaseClass {
+@Entity("client_release")
+export class Release extends BaseClass {
 	@Column()
 	name: string;
 
diff --git a/util/src/entities/Config.ts b/util/src/entities/Config.ts
index f4a266dc..8d29b387 100644
--- a/util/src/entities/Config.ts
+++ b/util/src/entities/Config.ts
@@ -188,8 +188,8 @@ export interface ConfigValue {
 	},
 	client: {
 		useTestClient: Boolean;
-		relases: {
-			useLocalRelases: Boolean; //TODO
+		releases: {
+			useLocalRelease: Boolean; //TODO
 			upstreamVersion: string;
 		}
 	},
@@ -222,7 +222,7 @@ export const DefaultConfigOptions: ConfigValue = {
 	},
 	general: {
 		instanceName: "Fosscord Instance",
-		instanceDescription: "This is a Fosscord instance made in pre-relase days",
+		instanceDescription: "This is a Fosscord instance made in pre-release days",
 		frontPage: null,
 		tosPage: null,
 		correspondenceEmail: "noreply@localhost.local",
@@ -389,8 +389,8 @@ export const DefaultConfigOptions: ConfigValue = {
 	},
 	client: {
 		useTestClient: true,
-		relases: {
-			useLocalRelases: true,
+		releases: {
+			useLocalRelease: true,
 			upstreamVersion: "0.0.264"
 		}
 	},
diff --git a/util/src/entities/index.ts b/util/src/entities/index.ts
index fc18d422..f023d5a6 100644
--- a/util/src/entities/index.ts
+++ b/util/src/entities/index.ts
@@ -27,4 +27,4 @@ export * from "./Template";
 export * from "./User";
 export * from "./VoiceState";
 export * from "./Webhook";
-export * from "./ClientRelase";
\ No newline at end of file
+export * from "./ClientRelease";
\ No newline at end of file
diff --git a/util/src/migrations/1648643945733-ReleaseTypo.ts b/util/src/migrations/1648643945733-ReleaseTypo.ts
new file mode 100644
index 00000000..944b9dd9
--- /dev/null
+++ b/util/src/migrations/1648643945733-ReleaseTypo.ts
@@ -0,0 +1,16 @@
+import { MigrationInterface, QueryRunner } from "typeorm";
+
+export class ReleaseTypo1648643945733 implements MigrationInterface {
+	name = "ReleaseTypo1648643945733";
+
+	public async up(queryRunner: QueryRunner): Promise<void> {
+		//drop table first because typeorm creates it before migrations run
+		await queryRunner.dropTable("client_release", true);
+		await queryRunner.renameTable("client_relase", "client_release");
+	}
+
+	public async down(queryRunner: QueryRunner): Promise<void> {
+		await queryRunner.dropTable("client_relase", true);
+		await queryRunner.renameTable("client_release", "client_relase");
+	}
+}