Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

First achievement (CommunicatorBronze) is not obtained from the database #69

Closed
catamaican opened this issue Nov 6, 2018 · 1 comment

Comments

@catamaican
Copy link

Steps for initial database:

2 x POST events, data:
{ "user_id": "user123", "name": "ForumPost", "payload": {} }

1 x GET user/user123 >> response=
{ "user_id": "user123", "achievements": [], "xp": [ { "name": "XP", "amount": 43 }, { "name": "postXP", "amount": 2 } ], "level": 1 }

but in database >>
{"_id":"5be13f399acbc00fb8e473fb","scope":null,"user_id":"user123","name":"CommunicatorBronze","current_amount":1,"total_amount":1,"__v":0}

Expected: the document from the database

Subsequent requests for event=ForumPost are executed correctly
--MongoDB data:
{"_id":"5be13f399acbc00fb8e473fb","scope":null,"user_id":"user123","name":"CommunicatorBronze","current_amount":0,"total_amount":1,"__v":0} {"_id":"5be140329acbc00fb8e473ff","scope":null,"user_id":"user123","name":"CommunicatorSilver","current_amount":1,"total_amount":1,"__v":0}

and GET user/user123 >>>
{ "user_id": "user123", "achievements": [ { "name": "CommunicatorSilver", "amount": 1, "scope": null } ], "xp": [ { "name": "XP", "amount": 73 }, { "name": "postXP", "amount": 5 } ], "level": 1 }

@catamaican
Copy link
Author

ok....it's mai fault

CommunicatorBronze:
[....]
actions:
- xp:
name: XP
amount: 23
****** hidden: true ************

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant