Implement the function of giving points between users
Help documentationUpdate anytime

Parameter description:
1. Token is the login credentials of the current user, and the specified points will be deducted from himself.
2. score The number of points given away
3. uid gives the other party’s user number

Parameter description:
1. domain fill in your own exclusive domain name
2. Token directly introduces the token passed in from the starting node
Next, you need to deduct your own points, but the parameter passed in is a positive number of points, so you need to write a code to get a negative number of points for deduction. Here, a code node is introduced, which only needs to return the value of -score:

Pass in parameters and directly reference the score parameter of the starting node.
After it becomes a negative number, it is output to the parameter `scoreSub`

Deduct your own points, parameter description:
1. Authorization, which is the authorization information for calling the backend api interface, can be viewed directly in your "apifm" backend, click "Factory settings" --> "Merchant Information" --> "Basic Authentication" on the left menu, and copy it directly;
2. remark, fill in the notes for deducting points this time
3. score, the number of points that need to be deducted, here refers to the `scoreSub` returned by the code node
4. uid, user number, refers to the user ID of the currently logged in user queried through token
Depending on whether the deduction is successful or not, there are two situations to be processed here based on whether the deduction is successful, so the return value also has two situations, so a "variable aggregation" node is introduced here.


Pass the code and msg information returned by deducting points to the "Variable Aggregation" node, and then directly give the code and msg of the "Variable Aggregation" node to the end node, and output the error message.
If the deduction is successful, the next step is to add corresponding points to the target user:

Parameter description:
1. Authorization, which is the authorization information for calling the backend api interface, can be viewed directly in your "apifm" backend, click "Factory settings" --> "Merchant Information" --> "Basic Authentication" on the left menu, and copy it directly;
2. remark, fill in the notes for this increase in points.
3. score, the number of points that needs to be added, here refers to the points parameter of the starting node
4. uid, user number, the gift user ID of the reference starting node

Then, the result code and msg of the increased points are passed to the "Variable Aggregation" node, and finally output to the end node in the same way.
At this point, the function of giving points to each other between users has been implemented.
You can call this workflow API on your H5, mini program, or APP to give points to each other.
Since points can be gifted to each other, the same goes for gifting balances. Why not give each other money? Everyone can give it a try~