fusio icon indicating copy to clipboard operation
fusio copied to clipboard

User Points Not Updating in Database

Open lgmohale opened this issue 1 year ago • 3 comments

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!

lgmohale avatar Oct 10 '24 09:10 lgmohale

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

Lossme8 avatar Oct 11 '24 10:10 Lossme8

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?

chriskapp avatar Oct 11 '24 16:10 chriskapp

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.

lgmohale avatar Oct 14 '24 08:10 lgmohale

We have added an option to set the user points through the backend API s. https://github.com/apioo/fusio-impl/commit/5d7afe7ab4ca0a16c4ea027fa2095ae2c1f7e843

This change is then included in the next release.

chriskapp avatar Apr 26 '25 20:04 chriskapp