API route for granting XP is broken

Resolved
  1. Philipp👨💻OPMar 26, 2025, 2:32 PM

    Unfortunately for quite a while already I'm unable to give users XP via the API. This neither works in my own code nor the API docs playground. Screenshots attached.

  2. ShadowMar 26, 2025, 6:55 PMSolution

    Hey @Philipp👨💻 This is working correctly in my testing, but it might be with how v1 is depreciated. api.kiai.app/v1 is a redirect to api-v1.kiai.app/v1 so it might just not be following that redirect properly.

  3. ShadowHey <@282193909566668800> This is working correctly in my testing, but it might be with how v1 is depreciated. https://api.kiai.app/v1 is a redirect to https://api-v1.kiai.app/v1 so it might just not be following that redirect properly.
    Philipp👨💻Mar 27, 2025, 5:11 PM

    Thank you, the issue still persists however. After some more debugging here's the specific error response I get on my backend:

    {"statusCode":500,"code":"P2021","error":"Internal Server Error","message":"\nInvalid `prisma.userGuildData.upsert()` invocation:\n\n\nThe table `public.TimeXp` does not exist in the current database."}
    
  4. ShadowMar 27, 2025, 5:12 PM

    Aha that makes then unfortunately, with v1 development being stopped and not updated alongside the bot

  5. ShadowAha that makes then unfortunately, with v1 development being stopped and not updated alongside the bot
    Philipp👨💻Mar 27, 2025, 5:14 PM

    So is there anything I can do about this currently? 🤔

  6. ShadowMar 27, 2025, 5:14 PM

    Update to the v2 API

  7. Philipp👨💻Mar 27, 2025, 5:15 PM

    Ah thank you, I've missed that. Will check it out 👍