Release -> ClientRelease

This commit is contained in:
Rory& 2025-07-11 13:20:29 +02:00
parent 5e3080d72f
commit 93ef08320e
4 changed files with 13 additions and 5 deletions

View File

@ -17,7 +17,7 @@
*/
import { route } from "@spacebar/api";
import { FieldErrors, Release } from "@spacebar/util";
import { FieldErrors, ClientRelease } from "@spacebar/util";
import { Request, Response, Router } from "express";
const router = Router();
@ -43,7 +43,7 @@ router.get(
},
});
const release = await Release.findOneOrFail({
const release = await ClientRelease.findOneOrFail({
where: {
enabled: true,
platform: platform as string,

View File

@ -108,6 +108,14 @@ router.patch(
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
if (body.icon && body.icon != guild.icon)

View File

@ -17,7 +17,7 @@
*/
import { route } from "@spacebar/api";
import { FieldErrors, Release } from "@spacebar/util";
import { FieldErrors, ClientRelease } from "@spacebar/util";
import { Request, Response, Router } from "express";
const router = Router();
@ -48,7 +48,7 @@ router.get(
},
});
const release = await Release.findOneOrFail({
const release = await ClientRelease.findOneOrFail({
where: {
enabled: true,
platform: platform as string,

View File

@ -24,7 +24,7 @@ import { dbEngine } from "../util/Database";
name: "client_release",
engine: dbEngine,
})
export class Release extends BaseClass {
export class ClientRelease extends BaseClass {
@Column()
name: string;