curl --request POST \
--url http://dolphinflashcards.com/api/update-goal-status \
--header 'Content-Type: application/json' \
--data '{
"jwtToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6ImEzMmZkZDRiMTQ2Njc3NzE5YWIyMzcyODYxYmRlZDg5In0.eyJpc3MiOiJodHRwOi8vZG9scGhpbmZsYXNoY2FyZHMuY29tIiwiYXVkIjoiYXBpIiwic3ViIjoidU5RR2lIencxdk9EaExybTVDRWtaQ1ZoTU93MSIsImFjY2Vzc190b2tlbiI6IjRiZTA2NDNmLTFkOTgtNTczYi05N2NkLWNhOThhNjUzNDdkZCIsImFjY2Vzc190b2tlbl9yYXciOiJ0ZXN0IiwiaWF0IjoxNzI2Nzc0MTYzfQ.F-fxFitPQF-gGHyhGPGxE_zj_b8XJybqe4J_iYG66BC4Dqm4LTb8RpcDLyYUhRCcpphihpWGbdp"
}'
{
"goalID-1": {
"data": {
"cards_revised_so_far": "0",
"cards_to_revise": "4"
},
"end_date": "30/07/2024",
"fail_date": "\" \"",
"status": "in progress",
"title": "Revise 4 cards by 15/07/2024",
"type": "Card"
},
"goalID-2": {
"data": {
"goal_xp": "60",
"start_date": "15/07/2024",
"starting_xp": "0"
},
"end_date": "30/07/2024",
"fail_date": " \" \"",
"status": "in progress",
"title": "Gain 60 XP by 30/07/2024",
"type": "XP"
}
}
Update the status of a goal. The possible values for the status of a goal are completed
, in progress
, or failed
. Returns an empty object when the jwtToken provided is invalid.
curl --request POST \
--url http://dolphinflashcards.com/api/update-goal-status \
--header 'Content-Type: application/json' \
--data '{
"jwtToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6ImEzMmZkZDRiMTQ2Njc3NzE5YWIyMzcyODYxYmRlZDg5In0.eyJpc3MiOiJodHRwOi8vZG9scGhpbmZsYXNoY2FyZHMuY29tIiwiYXVkIjoiYXBpIiwic3ViIjoidU5RR2lIencxdk9EaExybTVDRWtaQ1ZoTU93MSIsImFjY2Vzc190b2tlbiI6IjRiZTA2NDNmLTFkOTgtNTczYi05N2NkLWNhOThhNjUzNDdkZCIsImFjY2Vzc190b2tlbl9yYXciOiJ0ZXN0IiwiaWF0IjoxNzI2Nzc0MTYzfQ.F-fxFitPQF-gGHyhGPGxE_zj_b8XJybqe4J_iYG66BC4Dqm4LTb8RpcDLyYUhRCcpphihpWGbdp"
}'
{
"goalID-1": {
"data": {
"cards_revised_so_far": "0",
"cards_to_revise": "4"
},
"end_date": "30/07/2024",
"fail_date": "\" \"",
"status": "in progress",
"title": "Revise 4 cards by 15/07/2024",
"type": "Card"
},
"goalID-2": {
"data": {
"goal_xp": "60",
"start_date": "15/07/2024",
"starting_xp": "0"
},
"end_date": "30/07/2024",
"fail_date": " \" \"",
"status": "in progress",
"title": "Gain 60 XP by 30/07/2024",
"type": "XP"
}
}
OK
The response is of type object
.