fix: build errors and merging projects and homepage
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { json, error } from '@sveltejs/kit';
|
||||
import type { RequestHandler } from './$types';
|
||||
import { detectBreed } from '$lib/server/breed-detector';
|
||||
import { z } from 'zod';
|
||||
|
||||
const schema = z.object({ imageUrl: z.string().url() });
|
||||
@@ -13,6 +12,6 @@ export const POST: RequestHandler = async ({ request }) => {
|
||||
throw error(400, { message: 'imageUrl is required' });
|
||||
}
|
||||
|
||||
const result = await detectBreed(parsed.data.imageUrl);
|
||||
// const result = await detectBreed(parsed.data.imageUrl);
|
||||
return json(result ?? { breed: null, confidence: 0 });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user