Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST - Create Survey #38

Open
nishi7409 opened this issue Sep 19, 2021 · 0 comments
Open

POST - Create Survey #38

nishi7409 opened this issue Sep 19, 2021 · 0 comments
Assignees
Milestone

Comments

@nishi7409
Copy link
Collaborator

When a survey is submitted, create the model object in the backend.

The response that'd be received from the frontend looks like this:
(can also be viewed here)

{
        "prompt": "This is a test",
        "survey_title": "Test Survey",
        "user": {
            "username": "user",
            "email": null,
            "creation_time": "2021-06-17T01:55:02.146779Z"
        },
        "number_of_answers": 0,
        "creation_time": "2021-06-17T01:59:37.595032Z",
        "questions": [
            {
                "question": "Assign scores to the options",
                "options": [
                    {
                        "name": "Option 1",
                        "text": "A car",
                        "score": null
                    },
                    {
                        "name": "Option 2",
                        "text": "A boat",
                        "score": null
                    }
                ]
            }
        ]
    }
@nishi7409 nishi7409 added this to the Core Backend milestone Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants