Like what we’re doing? Star us on GitHub!

no docs in Vercel

akacronos
last month
7

I don't know why, but in vercel I don't get docs from a query but in localhost I do.


And i have another similar collection, and similar queries and I get docs in local and the domain. Does anyone have an idea of why?



This is the query, I get docs in local, but not in vercel


const { data } = await axios.get('/communityMembers', {
    params: {
      where: {
        and: [
          {
            community: {
              equals: {
                value: communityId,
                relationTo: 'community',
              },
            },
          },
          {
            member: {
              equals: userId,
            },
          },
        ],
      },
    },
  });


In other collection I use this other query and works in vercel and local:


const { data } = await axios.get('/visits', {
    params: {
      where: {
        and: [
          {
            activity: {
              equals: {
                value: activityId,
                relationTo: 'activities',
              },
            },
          },
          {
            attendee: {
              equals: userId,
            },
          },
        ],
      },
    },
  });


I deploy the project in digital ocean and the query for

communityMembers

works fine đź« . I really have no idea of why is not working in Vercel

Screenshot_2023-02-17_at_1.32.12_a.m..png
Screenshot_2023-02-17_at_1.32.51_a.m..png
  • Jarrod
    Payload Team
    last month

    do you get a response at all? does your axios fn throw an error?

  • akacronos
    last month

    yes, but without docs :/



    I have a similar request in another page that works



    The weird things:


    - Works in other similar collection / req


    - Works in local but not in vercel


    - Works in digitalocean app but not in vercel đź« 

    Screenshot_2023-02-17_at_3.02.49_p.m..png
    Screenshot_2023-02-17_at_3.03.08_p.m..png
Open the post
Continue the discussion in Discord
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More