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

An authenticated user can update a question #27

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

An authenticated user can update a question #27

josepostiga opened this issue Oct 3, 2020 · 2 comments · Fixed by #41
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 PATCH request to /questions/{questionId} with the updatable input and the question was created by me
I expect that question to be updated

Given I'm an authenticated user of any type
When I send a PATCH request to /questions/{questionId} with the updatable input and the question was not created by me
I expect to not be able to update that question

Updatable input

  • title: the title of the question. Must be filled.
  • slug: the URL friendly identifier, automatically generated based on the title. Must be unique.
  • description: the question itself.
  • updated_at: timestamp with timezone. Must be automatically updated with the current timestamp of the update action.

Additional requirements

This builds on the features of #25.

@josepostiga josepostiga added the story New feature label Oct 3, 2020
@tiagof
Copy link
Collaborator

tiagof commented Oct 14, 2020

@josepostiga I'll take this one if that's ok...

@tiagof
Copy link
Collaborator

tiagof commented Oct 14, 2020

PR #41

@tiagof tiagof self-assigned this Oct 14, 2020
@tiagof tiagof linked a pull request Oct 14, 2020 that will close this issue
josepostiga pushed a commit that referenced this issue Oct 25, 2020
* init

* Adds Question create feature

resolves #25
Removes unnecessary code in AccountsStoreController.

* Added '/discussions' prefix

As per #25 (comment)

* Minor fixes as per review

#40 (review)

* Cleanup

* Added question update

* Added tests

* Resolves #28, #29: "Update timestamps columns on links and tags tables" (#38)

* feat(Tags): add support to timestamps w/timezones

- drop regular timestamps columns
- create new ones with timestampsTz

* feat(Links): add support to timestamps w/timezones

added doctrine/dbal dependency

* fix: add method return type

* fix(Links): add missing timestamp (approved_at)

* chore: converted timestampTz to softDeletesTz

* feat(links): added approved_at datetime cast

* fix: replaced dropColumn with change method

* chore(Changelog): add latest updates

timestamps columns (on links and tags) changed to datetime w/timezone

* Resolves #25 - An authenticated user can post a question (#40)

* init

* Adds Question create feature

resolves #25
Removes unnecessary code in AccountsStoreController.

* Added '/discussions' prefix

As per #25 (comment)

* Minor fixes as per review

#40 (review)

* Cleanup

* Resolve conflicts + test tweaks

* Code cleanup + minor improvements

* minor tweaks

* final tweaks/cleanup

* style(Discussions): minor code style fixes

* ci(PHPUnit): add blade files to the code coverage exclusion list

Co-authored-by: Alexandre Reis <[email protected]>
Co-authored-by: José Postiga <[email protected]>
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