emotional-help-competition / backend

Java backend team's repository
1 stars 0 forks source link

[Java] Implement mapping for calculating result #23

Open kolesroma opened 1 year ago

kolesroma commented 1 year ago

Post request on /v1/results with body [{emotionId:1, value:5}, {emotionId:2, value:5}, {emotionId:3, value:5}] should parse data and return a json result. It has to be a Map of emotions

kolesroma commented 1 year ago

send a POST request to localhost:8080/v1/results with body

[
    {"emotionId": 1, "value":5},
    {"emotionId": 2, "value":4},
    {"emotionId": 3, "value":3},
    {"emotionId": 1, "value":3}
]

you should get a parsed result: key - emotion id value - sum of values in your post request

[
    "1": 8,
    "2": 4,
    "3": 3,
]
kolesroma commented 1 year ago

Image

kolesroma commented 1 year ago

Hi, @svitlana-p please take into consideration