Conversation
martin0024
requested changes
May 3, 2026
Contributor
martin0024
left a comment
There was a problem hiding this comment.
Good but needs changes.
Could we use that instead Call external api with Cache
| .where(eq(services.status, "active")); | ||
|
|
||
| const body = await Promise.all( | ||
| rows.map(async (row) => { |
Contributor
There was a problem hiding this comment.
Please add a try/catch to avoid if stripe crash then the routes crashes and it should return a message 'Impossible to fetch stripe services or no stripe services.
|
|
||
| export async function GET() { | ||
| const rows = await db | ||
| .select() |
Contributor
There was a problem hiding this comment.
please select() only the fields we need not all of them.
.select({
id: services.id,
type: services.type,
stripeProductId: services.stripeProductId,
durationMinutes: services.durationMinutes,
startDate: services.startDate,
endDate: services.endDate,
slots: services.slots,
})
Contributor
There was a problem hiding this comment.
Cache and revalidate the route because public services do not change every second.
Right now, every time i reload the mcld page i call stripe api to get all services?
Maybe there is a getAllProducts instead of fetching each of them ? to check.
martin0024
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11
Overview
Exposes an endpoint to show services and setup a wordpress site with a block show services
Testing
Screenshots / Screencasts
Checklist
Tip: You can make the issue and then check them after the fact or replace
[ ]with[x]to check it!Notes
Make sure you have Docker installed to run