Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

An authenticated user can post an answer to a question #31

Closed
josepostiga opened this issue Oct 3, 2020 · 3 comments · Fixed by #46
Closed

An authenticated user can post an answer to a question #31

josepostiga opened this issue Oct 3, 2020 · 3 comments · Fixed by #46
Assignees
Labels
story New feature

Comments

@josepostiga
Copy link
Member

josepostiga commented Oct 3, 2020

Scenario

Given I'm an authenticated user of any type
When I send a POST request to /discussions/questions/{questionId}/answers with the required input
I expect that answer to the given question to be stored

Database and schema information

A new question_answers table should be created with the following structure:

  • id: PK.
  • question_id: the related question internal identifier. Must be required and indexed.
  • author_id: FK, related to the user who created the answer. Must be required and indexed.
  • content: the answer itself. Must be required.
  • created_at: timestamp with timezone. Must be indexed and default to the date the resource is created.
  • updated_at: timestamp with timezone. Must be indexed.
  • deleted_at: timestamp with timezone. Must be indexed and default to null. This indicates if the resource was deleted.

Additional requirements

This builds on the features of #25, which introduces questions.

@dleicam
Copy link
Contributor

dleicam commented Oct 14, 2020

If is ok, i pick this one.

@josepostiga
Copy link
Member Author

@dleicam this issue required #25 to be integrated. The related PR is expected to be reviewed between today and tomorrow, but it can take some time to actually get merged (depends on if it might need additional work).

If you don't mind waiting, we're totally ok with you taking this one. If you don't want to wait, then you can choose another issue 😃

@dleicam
Copy link
Contributor

dleicam commented Oct 14, 2020

Thanks @josepostiga , i'm waiting for the merge of issue #25

dleicam added a commit to dleicam/laravel-portugal-api that referenced this issue Oct 19, 2020
dleicam added a commit to dleicam/laravel-portugal-api that referenced this issue Oct 19, 2020
dleicam added a commit to dleicam/laravel-portugal-api that referenced this issue Oct 19, 2020
dleicam added a commit to dleicam/laravel-portugal-api that referenced this issue Oct 19, 2020
dleicam added a commit to dleicam/laravel-portugal-api that referenced this issue Oct 19, 2020
dleicam added a commit to dleicam/laravel-portugal-api that referenced this issue Oct 24, 2020
dleicam added a commit to dleicam/laravel-portugal-api that referenced this issue Oct 24, 2020
dleicam added a commit to dleicam/laravel-portugal-api that referenced this issue Oct 24, 2020
josepostiga pushed a commit that referenced this issue Oct 24, 2020
…46)

* Resolve #31 - An authenticated user can post an answer to a question

* Resolve #31 - An authenticated user can post an answer to a question

* Resolve #31 - An authenticated user can post an answer to a question

* Resolve #31 - An authenticated user can post an answer to a question

* Resolve #31 - An authenticated user can post an answer to a question (Rename Table name)

* Resolve #31 - An authenticated user can post an answer to a question (Request Changed)

* Resolve #31 - An authenticated user can post an answer to a question (Request Changed)

* Resolve #31 - An authenticated user can post an answer to a question (Resolve conflicts)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
story New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants