minor fixes

This commit is contained in:
Wells Bunker 2025-10-01 10:53:45 -06:00
parent aa73186b2a
commit 098b54103d
No known key found for this signature in database
GPG Key ID: DB16D6F2679B78FC
3 changed files with 2 additions and 9 deletions

View File

@ -39,10 +39,6 @@ const app = new Hono().put(
});
}
if (!assetId) {
throw new HTTPException(404, { message: 'Metric not found' });
}
const result: PutScreenshotResponse = await uploadScreenshotHandler({
assetType: 'metric_file',
assetId,

View File

@ -20,9 +20,6 @@ const app = new Hono().put(
const user = c.get('busterUser');
const report = await getReportFileById({ reportId: assetId, userId: user.id });
if (!report) {
throw new HTTPException(404, { message: 'Report not found' });
}
if (!report) {
throw new HTTPException(404, { message: 'Report not found' });

View File

@ -11,7 +11,7 @@ export const PutScreenshotRequestSchema = z.object({
export type PutScreenshotRequest = z.infer<typeof PutScreenshotRequestSchema>;
export const PutScreenshotResponseSchema = z.object({
success: z.literal(true),
success: z.boolean(),
bucketKey: z.string().min(1, 'Bucket key is required'),
});
@ -19,7 +19,7 @@ export type PutScreenshotResponse = z.infer<typeof PutScreenshotResponseSchema>;
export const GetScreenshotResponseSchema = z.object({
success: z.boolean(),
url: z.string().url(),
url: z.string(),
});
export type GetScreenshotResponse = z.infer<typeof GetScreenshotResponseSchema>;