Fix video routes generating error

This commit is contained in:
Sam Carlton 2020-12-26 12:59:39 -06:00
parent 5bf72f1d0a
commit fa222d3116
5 changed files with 49 additions and 6 deletions

View file

@ -3,9 +3,20 @@
export function getAppEndpoint ( app ) {
// console.log('app', app)
if(app.category !== Object(app.category)) {
console.warn('app has no categories', app)
}
if (app.category.slug === 'homebrew') return `/formula/${app.slug}`
if (app.category.slug === 'games') return `/game/${app.slug}`
return `/app/${app.slug}`
}
export function getVideoEndpoint ( video ) {
return `/tv/${video.slug}`
}