proper segment url filtering

This commit is contained in:
tom
2022-10-15 12:18:45 +03:00
parent 56b18c88f1
commit a613455b4d
+3 -1
View File
@@ -6,5 +6,7 @@ export default function getUrlWithNetwork(_req: NextApiRequest, path: string) {
return [
appConfig.api.basePath,
path,
].filter(Boolean).join('');
]
.filter((segment) => segment !== '' && segment !== '/')
.join('');
}