-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
🚧 Implemented plugin based author model in API v2 #10284
Conversation
Code looks good in general 👍 Just leaving some thoughts:
|
This is a good question. For now, there is just one/two models, so maybe too early of an optimization, but definitely would go with something to separate models that just extend existing ones. |
404a95d
to
a6740b2
Compare
Notes from a discussion we had with @kirrg001 about further approach:
|
e6026fc
to
265910e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach does not work with the get helper.
e.g. {{#get "tags"}}
It will query the tags controller and not the tags-public controller.
You probably just need to tweak the get helper. |
@gargol Could you please rebase against master? Thanks 😃 |
137c172
to
7c77624
Compare
Corrected the {{get "tags"}} helper but still running into a situation when there's no data populated in UrlService after the theme is switched, will need to investigate this problem a bit deeper. |
Found two more bugs: 1
I assume this not trivial to solve, because we will receive the url event for the post, but we don't have a trigger that the tag url is now available. 2If i have a tag which is not assigned to any post, i won't receive the tag via the content API, but i can serve the tag on the site. To reproduce:
If you do the same with an author. It works for both cases. |
I will look into (2) now. I will also rebase the branch against master. |
refs TryGhost#10124 - Author model returns only users that have published non page posts
- Needs to be corrected as some event listeners are missing and initialization never ends
…}} helper from api v2
227b97b
to
222b00c
Compare
Merging it as is for now 🚀 Will follow up with an issue that should address 2 problems discovered by QA |
refs #10124
This is just a first go with Authors API v2 endpoint only. More to come tomorrow once this approach is discussed :)