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

API V2 complete controller set #10060

Closed
11 of 12 tasks
kirrg001 opened this issue Oct 25, 2018 · 4 comments · Fixed by #10975
Closed
11 of 12 tasks

API V2 complete controller set #10060

kirrg001 opened this issue Oct 25, 2018 · 4 comments · Fixed by #10975
Assignees
Labels
affects:api Affects the Ghost API server / core Issues relating to the server or core of Ghost

Comments

@kirrg001
Copy link
Contributor

kirrg001 commented Oct 25, 2018

(refs #9866)

There are some controllers missing in V2.

@kirrg001 kirrg001 added server / core Issues relating to the server or core of Ghost affects:api Affects the Ghost API refactoring/cleanup labels Oct 25, 2018
@m1guelpf
Copy link
Contributor

Need help with this? What steps should I take to migrate a controller to the v2 API?

@kirrg001
Copy link
Contributor Author

@m1guelpf Thanks for your interest. The Ghost team is working on this issue.
I'd suggest you choose an issue from this list (issues which are labelled with "help wanted" and/or "good-first-issue".

rishabhgrg added a commit to rishabhgrg/Ghost that referenced this issue Nov 2, 2018
refs TryGhost#10060

- Added slack controller to v2 admin API
- Added new API test for slack API controller
naz pushed a commit that referenced this issue Nov 6, 2018
refs #10060

- Added slack controller to v2 admin API
- Added new API test for slack API controller
rishabhgrg added a commit to rishabhgrg/Ghost that referenced this issue Dec 3, 2018
@kirrg001
Copy link
Contributor Author

themes

Working on this.

kirrg001 added a commit that referenced this issue Jan 30, 2019
naz added a commit that referenced this issue May 6, 2019
kirrg001 pushed a commit to kirrg001/Ghost that referenced this issue May 6, 2019
naz added a commit that referenced this issue Jul 17, 2019
refs #10060

- Modules extractions done here are meant to make upcoming migration of authentication controller to v2 more manageable and reduce code repetition
- There were couple modules extracted for different areas that controller touches: passwordrest, accept (for invitation), setup 
- The aim was to keep changes to the minimum while making small readability improvements to new functions through async/await syntax
- The biggest barrier to make more encapsulated functions was the fact that we mutate options parameter on multiple levels in the controller. e.g mutations of options.data during validation on the password reset ties it up to the implementation of doReset function
rishabhgrg added a commit to rishabhgrg/Ghost that referenced this issue Aug 1, 2019
refs TryGhost#10060

- Uses validation layer for checking url data on oembed requests
- Fixes typo in comment
naz added a commit that referenced this issue Aug 1, 2019
refs #10060

- Migrated authentication.resetPassword method to v2
- Migrated authentication.acceptInvitation method to v2
- Migrated authentication.setup method to v2
- Added missing test coverage for "setupUpdate" method
- Migrated authentication.updateSetup method to v2
- Migrated authentication.isInvitation method to v2
- Migrated authentication.isSetup method to v2
- Removed unused 'setup.completed' event as it wasn's used anywhere in the system and has been complicating the logic unnecessarily
- Without the event, it's possible to simplify sendNotification method to just use email address of the user
- Added email sending check to v0.1 test suite
- Refactored sendNotification method to just use email address as parameter
- Renamed sendNotification to sendWelcomeMail
- The only thing the method does now is sending welcome mail, so new naming seems natural :)
rishabhgrg added a commit that referenced this issue Aug 1, 2019
refs #10060

- Uses validation layer for checking url data on oembed requests
- Fixes typo in comment
naz added a commit to naz/Ghost that referenced this issue Aug 7, 2019
closes TryGhost#10060

- Implemented scheduling for posts and pages
- Added cache invalidation when scheduling
- Refactored admin token eneration function to accept existing key as parameter in tests
- Added Ghost Scheduler Integration fixture
- Added fixture for permissions for post publish action
- Migrated getScheduled method to v2
- Did not add support for 'from' and 'to' parameters as they were not used by DefaultScheduler
- This method needs rethinking in a long run as it's an ugly hack and should rather become proper endpoint that returns JSON data instead of models
- Removed unused auth middleware from v2 routes
- Added internal scheduler role
- Implemetnted transactions in v2 frame
- This takes into account scenario mentioned in c93f03b
- Specifically:
>if two queries happening in a transaction we have to signalise
  knex/mysql that we select for an update
  otherwise the following case happens:
  you fetch posts for an update
  a user requests comes in and updates the post (e.g. sets title to "X")
  you update the fetched posts, title would get overriden to the old one
naz added a commit to naz/Ghost that referenced this issue Aug 7, 2019
refs TryGhost#10060

- Modification of https://github.com/TryGhost/Ghost/pull/10974/files
- Added publish permission migrations for all roles having "post": "all" permission
@naz naz closed this as completed in #10975 Aug 7, 2019
@rishabhgrg
Copy link
Contributor

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:api Affects the Ghost API server / core Issues relating to the server or core of Ghost
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants