aryaapp / xavier

Xavier is the API server for Arya.
0 stars 0 forks source link

Edit a default journal entry - Update answer to default questionnaire #7

Open m20io opened 9 years ago

m20io commented 9 years ago

Please write specs for the this story and finish the not implemented features. (If there is more please don't delete it)

User Story

A paitent wants to change the answers to the default questionnaire for a specific journal entry.

Regular Process

Sent a put request to /user/journals/{:uuid} with the new data like this:

{
    "answers": [
        {
            # Slider
            "question": "{QUESTION UUID}",
            "values" : {
                "general" : 20,
                ...
            }
        },
        {
            # List
            "question": "{QUESTION UUID}",
            "values" : [
                "I was at school",
                "Scored a nice chick",
                ...
            ]
        },
        {
            # Text
            "question": "{QUESTION UUID}",
            "values" : "Hello World"
        }
    ]
}