Prismic Rest API Query Params Issue

Hi all

I'm trying to write a serverless function in next and i have issues with the Prismic API
Below is my code
image

My issue is when i make an API call in next without query params it works but as soon as i add params it returns an empty array but the repository isn't empty

Your help will be appreciated !

Hello @yolit.academy

Welcome to the Prismic community, and thanks for reaching out to us.

I don't see any issue in the code; it looks good.

Can you try to change the query method from get() to getByType(documentType, params), and see if it works?

Thanks,
Priyanka

Hi @Priyanka

It worked like a charm !

@Priyanka

Thank you so much

I am happy to help you @yolit.academy. Feel free to reach out to us if you need any assistance.