-
Notifications
You must be signed in to change notification settings - Fork 56
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: splits templates API into list and fetch by id #481
refactor: splits templates API into list and fetch by id #481
Conversation
|
f95af47
to
7b67f1a
Compare
7b67f1a
to
de5de71
Compare
Thanks for your work! Sorry if it wasn't in the requirements, but following your comments about the impact on the frontend; I suggest we keep the old |
Probably I could create this extra api endpoints under /v2. To make this evolution more clear from api perspective and at the same time keeping /v1/templates to keep old clients work without issues. Some people also may have cached version of SPA in their browsers (long lived browser tabs), and their version of client app may try to use older API version |
Great suggestion and I discussed this internally, but for the sake of keeping the scope of this pr small, I suggest we just keep the old version and add the 2 new endpoints you added. |
c4d9e0a
to
ac6e616
Compare
Changed, now it's safe to merge it |
ac6e616
to
8e7d413
Compare
8e7d413
to
8095bad
Compare
|
||
export default new OpenAPIHono().openapi(route, async c => { | ||
const templatesPerCategory = await getCachedTemplatesGallery(); | ||
// TODO: remove manual response filtering when https://github.com/honojs/middleware/issues/181 is done |
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.
🔥
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.
Tested it locally, works great. Good job!
Not tested.Fixes #102