1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-06 10:52:31 +01:00

Fixed typo in table name 'client_relase' -> 'client_release'. Fixed more typos of the same typo.

This commit is contained in:
Madeline 2022-03-31 00:01:21 +11:00
parent 093ae55580
commit 551ac6cd96
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
10 changed files with 34 additions and 21 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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,

View File

@ -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
});
});

View File

@ -111,4 +111,4 @@
"typescript-json-schema": "^0.50.1",
"ws": "^7.4.2"
}
}
}

View File

@ -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;

View File

@ -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"
}
},

View File

@ -27,4 +27,4 @@ export * from "./Template";
export * from "./User";
export * from "./VoiceState";
export * from "./Webhook";
export * from "./ClientRelase";
export * from "./ClientRelease";

View File

@ -0,0 +1,13 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class ReleaseTypo1648643945733 implements MigrationInterface {
name = "ReleaseTypo1648643945733";
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.renameTable("client_relase", "client_release");
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.renameTable("client_release", "client_relase");
}
}