MarvinKR
MarvinKR
Explore posts from servers
DTDrizzle Team
Created by MarvinKR on 7/19/2024 in #help
Error Handling for Null Values in Drizzle-Zod + Shadcn Form (React-Hook-Form)
The error message indicates that the value property of the field object can be null, but the Input, Checkbox components value prop do not accept null as a valid type. It only accepts string, number, readonly string[], or undefined.
23 replies
TTCTheo's Typesafe Cult
Created by MarvinKR on 7/11/2024 in #questions
How to use uploadthing server side?
Is this the correct way?
export const utapi = new UTApi(); // imported from uploadthing/server

// Extract image URLs and upload them to UploadThing
const uploadPromises = validatedData.map(async (item) => {
if (item.image) {
const response = await utapi.uploadFilesFromUrl(item.image);
if (response.error) {
throw new Error("Error uploading image");
}
item.image = response.data.url; // Replace with UploadThing URL
}
return item;
});
export const utapi = new UTApi(); // imported from uploadthing/server

// Extract image URLs and upload them to UploadThing
const uploadPromises = validatedData.map(async (item) => {
if (item.image) {
const response = await utapi.uploadFilesFromUrl(item.image);
if (response.error) {
throw new Error("Error uploading image");
}
item.image = response.data.url; // Replace with UploadThing URL
}
return item;
});
14 replies
HHono
Created by MarvinKR on 6/21/2024 in #help
status 200 with empty JSON
No description
22 replies
HHono
Created by MarvinKR on 6/19/2024 in #help
All GET/POST api calls returns Internal server error 500
I'm using Hono for my app https://platform.procureezy.com/workflows but it keeps returning this error for all my API calls : GET https://platform.procureezy.com/api/workflows 500 (Internal Server Error)
[[...route]]
app.onError((err, c) => {
if (err instanceof HTTPException) {
return err.getResponse();
}
return new Response("Internal Server Error", { status: 500 });
});
app.onError((err, c) => {
if (err instanceof HTTPException) {
return err.getResponse();
}
return new Response("Internal Server Error", { status: 500 });
});
workflow.ts
10 replies
DTDrizzle Team
Created by MarvinKR on 9/16/2023 in #help
Issue with Drizzle-Zod: Due to a type mismatch between the ZodObject and ZodType types.
No description
35 replies
DTDrizzle Team
Created by MarvinKR on 8/28/2023 in #help
[Remunerated] Looking for help to switch my project from Prisma to DrizzleORM
No description
1 replies