fix: resolve TypeScript and lint issues
CI / check (push) Successful in 26s
CI / release (push) Skipped
CI / deploy (push) Successful in 58s

- Fix proxy routes to use resolveImagerBase instead of removed resolveUpstreamBase
- Fix avatarImageUrl type signature to use AvatarOptions
- Run biome formatter
This commit is contained in:
openhands committed 2026-08-09 19:42:02 +02:00
1 parent fc7e6ca248
commit 7a2c0fd4d4
19 files changed
+86 -164

No files matched your search

+15 -22
View File
@@ -8,7 +8,6 @@ import { ContentCard, EmptyState, OnlineBadge } from "@/components/public/ui";
import { auth } from "@/lib/auth";
import { db, MessengerFriendships, User } from "@/lib/db";
import { avatarImageUrl } from "@/lib/format";
import { siteSettings } from "@/lib/services/site-settings";
export const metadata = { title: "Friends" };
@@ -66,26 +65,20 @@ export default async function FriendsPage({
),
);
const [friends, imagerBase] = await Promise.all([
friendIds.length
? db
.select({
id: User.id,
username: User.username,
look: User.look,
motto: User.motto,
online: User.online,
})
.from(User)
.where(inArray(User.id, friendIds))
.orderBy(asc(User.username))
.catch(() => [])
: Promise.resolve([]),
siteSettings.get(
"habbo_imaging_url",
"https://www.habbo.com/habbo-imaging/avatarimage",
),
]);
const friends = friendIds.length
? await db
.select({
id: User.id,
username: User.username,
look: User.look,
motto: User.motto,
online: User.online,
})
.from(User)
.where(inArray(User.id, friendIds))
.orderBy(asc(User.username))
.catch(() => [])
: [];
const errorMessage =
error === "not_found"
@@ -125,7 +118,7 @@ export default async function FriendsPage({
) : (
<div className="card-grid sm-2 lg-3" style={{ padding: "1rem" }}>
{friends.map((friend) => {
const avatar = avatarImageUrl(imagerBase ?? "", friend.look, {
const avatar = avatarImageUrl(friend.look, {
size: "s",
headOnly: true,
});