Release -> ClientRelease
This commit is contained in:
parent
5e3080d72f
commit
93ef08320e
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { route } from "@spacebar/api";
|
import { route } from "@spacebar/api";
|
||||||
import { FieldErrors, Release } from "@spacebar/util";
|
import { FieldErrors, ClientRelease } from "@spacebar/util";
|
||||||
import { Request, Response, Router } from "express";
|
import { Request, Response, Router } from "express";
|
||||||
|
|
||||||
const router = Router();
|
const router = Router();
|
||||||
@ -43,7 +43,7 @@ router.get(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const release = await Release.findOneOrFail({
|
const release = await ClientRelease.findOneOrFail({
|
||||||
where: {
|
where: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
platform: platform as string,
|
platform: platform as string,
|
||||||
|
|||||||
@ -108,6 +108,14 @@ router.patch(
|
|||||||
relations: ["emojis", "roles", "stickers"],
|
relations: ["emojis", "roles", "stickers"],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// trying to `select` this fails
|
||||||
|
guild.channel_ordering = (
|
||||||
|
await Guild.findOneOrFail({
|
||||||
|
where: { id: guild_id },
|
||||||
|
select: { channel_ordering: true },
|
||||||
|
})
|
||||||
|
).channel_ordering;
|
||||||
|
|
||||||
// TODO: guild update check image
|
// TODO: guild update check image
|
||||||
|
|
||||||
if (body.icon && body.icon != guild.icon)
|
if (body.icon && body.icon != guild.icon)
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { route } from "@spacebar/api";
|
import { route } from "@spacebar/api";
|
||||||
import { FieldErrors, Release } from "@spacebar/util";
|
import { FieldErrors, ClientRelease } from "@spacebar/util";
|
||||||
import { Request, Response, Router } from "express";
|
import { Request, Response, Router } from "express";
|
||||||
|
|
||||||
const router = Router();
|
const router = Router();
|
||||||
@ -48,7 +48,7 @@ router.get(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const release = await Release.findOneOrFail({
|
const release = await ClientRelease.findOneOrFail({
|
||||||
where: {
|
where: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
platform: platform as string,
|
platform: platform as string,
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import { dbEngine } from "../util/Database";
|
|||||||
name: "client_release",
|
name: "client_release",
|
||||||
engine: dbEngine,
|
engine: dbEngine,
|
||||||
})
|
})
|
||||||
export class Release extends BaseClass {
|
export class ClientRelease extends BaseClass {
|
||||||
@Column()
|
@Column()
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user