Fix Biome linting error: wrap switch default case in block scope

- Add curly braces around default case content to satisfy noSwitchDeclarations rule
- Prevents variable declarations from being accessible to other switch cases
- Apply Biome formatting fixes for import statement and spacing

Co-Authored-By: nate@buster.so <nate@buster.so>
This commit is contained in:
Devin AI 2025-07-23 13:38:45 +00:00
parent 783b95b190
commit 8bea0e8401
1 changed files with 14 additions and 7 deletions

View File

@ -1,4 +1,10 @@
import { getChatTitle, getCollectionTitle, getDashboardTitle, getMetricTitle, getUserOrganizationId } from '@buster/database';
import {
getChatTitle,
getCollectionTitle,
getDashboardTitle,
getMetricTitle,
getUserOrganizationId,
} from '@buster/database';
import { GetTitleRequestSchema, type GetTitleResponse } from '@buster/server-shared/title';
import { zValidator } from '@hono/zod-validator';
import { Hono } from 'hono';
@ -33,10 +39,11 @@ const app = new Hono()
case 'dashboard':
title = await getDashboardTitle({ assetId, organizationId: userOrg.organizationId });
break;
default:
default: {
const _exhaustive: never = assetType;
throw new HTTPException(400, { message: `Unsupported asset type: ${assetType}` });
}
}
if (title === null) {
throw new HTTPException(404, { message: 'Asset not found or access denied' });