We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e84c4a8 commit 9875678Copy full SHA for 9875678
src/factory.ts
@@ -327,11 +327,14 @@ export const apiFactory: ClubsFunctionApiFactory = (options) => {
327
: undefined
328
329
const apiRoute = apiRoutes
330
- ? apiRoutes.find(
331
- ({ paths, method }) =>
+ ? apiRoutes.find(({ paths, method }) => {
+ const apipath = `${plugin?.meta.id}/${paths.join('/')}`
332
+ const apipathSlash = `${apipath}/`
333
+ return (
334
method === context.request.method &&
- path === `${plugin?.meta.id}/${paths.join('/')}`
- )
335
+ (path === apipath || path === apipathSlash)
336
+ )
337
+ })
338
339
const response = apiRoute
340
? apiRoute.handler(context)
0 commit comments