mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 12:52:47 -07:00
fix: catch-all server side handler (#287)
This commit is contained in:
@@ -85,8 +85,7 @@ async function getRouteNodes(
|
||||
} else if (fullPath.match(/\.(rs)$/)) {
|
||||
const filePath = replaceBackslash(path.join(dir, dirent.name))
|
||||
const filePathNoExt = removeExt(filePath)
|
||||
let routePath =
|
||||
cleanPath(`/${filePathNoExt.split('.').join('/')}`) || ''
|
||||
let routePath = cleanPath(`/${filePathNoExt}`) || ''
|
||||
|
||||
if (routePath === 'index') {
|
||||
routePath = '/'
|
||||
|
||||
@@ -24,6 +24,7 @@ const IndexRoute = Index.update({
|
||||
const PostscatchallRoute = Postscatchall.update({
|
||||
path: '/posts/[...catch_all]',
|
||||
getParentRoute: () => rootRoute,
|
||||
hasHandler: true,
|
||||
})
|
||||
|
||||
// Create and export the route tree
|
||||
|
||||
Reference in New Issue
Block a user