test: restore validation baseline

This commit is contained in:
2026-08-07 10:23:16 +00:00
parent 1a1d0b2d91
commit 044c916990
11 changed files with 45 additions and 25 deletions
+8 -13
View File
@@ -231,19 +231,14 @@ export const accountRouter = router({
contentType: ICON_CONTENT_TYPES[extension]!,
body: buffer,
});
let stored;
try {
stored = await ctx.users.addIconForWindow(
user.id,
uploaded.picture,
0,
now,
new Date(now.getTime() - ICON_UPLOAD_COOLDOWN_MS),
MAX_ACTIVE_ICONS
);
} catch (error) {
throw error;
}
const stored = await ctx.users.addIconForWindow(
user.id,
uploaded.picture,
0,
now,
new Date(now.getTime() - ICON_UPLOAD_COOLDOWN_MS),
MAX_ACTIVE_ICONS
);
if (!stored.ok) {
if (stored.reason === 'LIMIT') {
throw new TRPCError({