diff --git a/src/api/routes/download.ts b/src/api/routes/download.ts
index 85fb41bed..58a4ce76a 100644
--- a/src/api/routes/download.ts
+++ b/src/api/routes/download.ts
@@ -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,
diff --git a/src/api/routes/guilds/#guild_id/index.ts b/src/api/routes/guilds/#guild_id/index.ts
index 75d05c9b3..d2310f6da 100644
--- a/src/api/routes/guilds/#guild_id/index.ts
+++ b/src/api/routes/guilds/#guild_id/index.ts
@@ -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)
diff --git a/src/api/routes/updates.ts b/src/api/routes/updates.ts
index 101bd3bc4..04a455b61 100644
--- a/src/api/routes/updates.ts
+++ b/src/api/routes/updates.ts
@@ -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,
|