mirror of https://github.com/buster-so/buster.git
minor fixes
This commit is contained in:
parent
aa73186b2a
commit
098b54103d
|
@ -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,
|
||||
|
|
|
@ -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' });
|
||||
|
|
|
@ -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>;
|
||||
|
|
Loading…
Reference in New Issue