Fix TypeScript errors blocking Docker build
- Fix Authentik button type casting issue in login page * Use exported signIn instead of authClient type assertion * Add proper error handling for OAuth calls - Fix image MIME type handling in import-photo.ts * Convert base64 to data URL format for AI SDK compatibility - Fix type annotations in auth/server.ts changeEmail handler * Add explicit type annotation for destructured parameters These TypeScript errors were preventing 'pnpm build' from completing during Docker image build process.
This commit is contained in:
@@ -40,6 +40,9 @@ export async function importFromPhoto(
|
||||
): Promise<ImportedRecipe> {
|
||||
const model = resolveModel(config);
|
||||
|
||||
// Create a data URL from base64
|
||||
const imageDataUrl = `data:${mimeType};base64,${imageBase64}`;
|
||||
|
||||
const { object } = await generateObject({
|
||||
model,
|
||||
schema: ImportedRecipeSchema,
|
||||
@@ -49,7 +52,7 @@ export async function importFromPhoto(
|
||||
{
|
||||
role: "user",
|
||||
content: [
|
||||
{ type: "image", image: imageBase64, mimeType },
|
||||
{ type: "image", image: imageDataUrl },
|
||||
{ type: "text", text: "Extract the complete recipe from this image." },
|
||||
],
|
||||
},
|
||||
|
||||
@@ -128,7 +128,7 @@ export const auth = betterAuth({
|
||||
},
|
||||
changeEmail: {
|
||||
enabled: true,
|
||||
sendChangeEmailVerification: async ({ newEmail, url }) => {
|
||||
sendChangeEmailVerification: async ({ newEmail, url }: { newEmail: string; url: string }) => {
|
||||
await sendEmail({
|
||||
to: newEmail,
|
||||
subject: "Verify your new Epicure email",
|
||||
|
||||
Reference in New Issue
Block a user