apioo / fusio

Open source API management platform
https://www.fusio-project.org
Apache License 2.0
1.86k stars 223 forks source link

User Points Not Updating in Database #586

Open lgmohale opened 1 week ago

lgmohale commented 1 week ago

Hi @chriskapp, I hope you are well.

I'm attempting to update user points through the API backend at https:{base_url}backend/user/{user_id}. While I receive a success message, the database isn’t reflecting the changes. Other fields appear to be updating correctly. Could you please assist me with this issue?

Thank you!

Lossme8 commented 1 week ago

@chriskapp, I would greatly appreciate any pointers you have about the above issue, as I am also facing the same blocker.

chriskapp commented 1 week ago

Hi @lgmohale and @Lossme8, this is indeed currently not possible, you can only increase the points of a user by purchasing a plan, then the points of the plan are credited to the user account. Initially this was a design decision to protect a user account from manipulation, so that it is not possible to remove purchased points. But in general it would be easy possible to enable this at the user update endpoint. Could you explain a little bit your user-case why you need the option to change the points of a user?

lgmohale commented 1 week ago

Hi @chriskapp Thank you for your explanation regarding the point system. Our operations are currently prepaid, and we utilize a third-party service for collecting payments. We would like the ability to update a user's points upon successful payment requests using the endpoint. This flexibility would allow us to streamline our processes and enhance the user experience by immediately reflecting their purchases in their accounts.