mirror of https://github.com/buster-so/buster.git
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:
parent
783b95b190
commit
8bea0e8401
|
@ -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 { GetTitleRequestSchema, type GetTitleResponse } from '@buster/server-shared/title';
|
||||||
import { zValidator } from '@hono/zod-validator';
|
import { zValidator } from '@hono/zod-validator';
|
||||||
import { Hono } from 'hono';
|
import { Hono } from 'hono';
|
||||||
|
@ -33,10 +39,11 @@ const app = new Hono()
|
||||||
case 'dashboard':
|
case 'dashboard':
|
||||||
title = await getDashboardTitle({ assetId, organizationId: userOrg.organizationId });
|
title = await getDashboardTitle({ assetId, organizationId: userOrg.organizationId });
|
||||||
break;
|
break;
|
||||||
default:
|
default: {
|
||||||
const _exhaustive: never = assetType;
|
const _exhaustive: never = assetType;
|
||||||
throw new HTTPException(400, { message: `Unsupported asset type: ${assetType}` });
|
throw new HTTPException(400, { message: `Unsupported asset type: ${assetType}` });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (title === null) {
|
if (title === null) {
|
||||||
throw new HTTPException(404, { message: 'Asset not found or access denied' });
|
throw new HTTPException(404, { message: 'Asset not found or access denied' });
|
||||||
|
|
Loading…
Reference in New Issue