mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Filter eleventy endpoints by route, not payload
This commit is contained in:
parent
44fa023a06
commit
37a296adfe
4 changed files with 16 additions and 16 deletions
|
|
@ -56,4 +56,10 @@ export function getVideoEndpoint ( video ) {
|
|||
return `/tv/${video.slug}`
|
||||
}
|
||||
|
||||
export function getRouteType ( routeString ) {
|
||||
// Remove first slash and split by remaining
|
||||
// slashes to get first part of route
|
||||
const [ routeType ] = routeString.substring(1).split('/')
|
||||
|
||||
return routeType
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue