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

Refactor response for creating a new brainstorm (POST /ideas) #77

Open
grwthomps opened this issue Mar 15, 2020 · 0 comments
Open

Refactor response for creating a new brainstorm (POST /ideas) #77

grwthomps opened this issue Mar 15, 2020 · 0 comments
Labels

Comments

@grwthomps
Copy link
Member

Refactor successful response of POST /ideas to include all attributes of newly created Idea entry in database:

Request remains the same:

POST /ideas

Body:

{
	"idea": "Test idea for Keanu Reeves",
	"id": "c1e9a92195d98380747159598983bf96",
	"action": "Create an App",
	"isGenius": "False",
	"question": "Create an app about learning to code",
	"categories": [{"name": "Education"}, {"name": "Technology"}]
}

Successful response should be refactored to be similar to request but include database id and remove token:

Status: 200

{
	"id": 5
        "idea": "Test idea for Keanu Reeves",
	"action": "Create an App",
	"isGenius": "False",
	"question": "Create an app about learning to code",
	"categories": [{"name": "Education"}, {"name": "Technology"}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant