-
Notifications
You must be signed in to change notification settings - Fork 26
feat: Support next 15 #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hi! I tried you changes locally but still get the issue {"message":"Invalid path parameters.","errors":[{"code":"invalid_type","expected":"object","received":"promise","path":[],"message":"Expected object, received promise"}]} Can I help debug this somehow? Here is the route that is failing const studyManifestResponseSchema = z.array(z.any());
const errorResponseSchema = z.object({
error: z.string(),
});
const querySchema = z.object({
range: z.string().optional(),
});
const getStudyManifestOperation = routeOperation({
method: "GET",
})
.input({
params: z.object({
studyId: z.string(),
}),
query: z.object({
range: z.string().optional(),
}),
})
.outputs([
{
status: 200,
contentType: "application/octet-stream",
body: studyManifestResponseSchema,
},
{
status: 500,
contentType: "application/json",
body: errorResponseSchema,
},
])
.handler(async (request: Request, extra) => {
try {
const params = extra.params;
console.log("Params", params);
return TypedNextResponse.json(
{ error: "..." },
{ status: 200 },
);
} catch (error) {
return TypedNextResponse.json(
{ error: "..." },
{ status: 500 },
);
}
});
export const { GET } = route({
getStudyManifest: getStudyManifestOperation,
});
|
You can directly follow this comment for usage, the code in this PR also comes from here #183 (comment) |
I tried that patch as well but still get error. Do I need to change my code in some way? |
(cherry picked from commit 7e519c2)
@Hugo-Persson I have just submitted this part of code SaadBazaz@7e519c2 , why don't you try it again? |
Yes it works now! Thank you! Can I use your branch as an NPM package before being merged instead of compiling locally? |
You can fork my repository to publish your own package or wait for the author to merge and release. |
close #183