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

@ -8,7 +8,7 @@ import buildHomebrewList from './helpers/build-homebrew-list.js'
import buildVideoList from './helpers/build-video-list.js'
import { categories } from './helpers/categories.js'
import { getAppEndpoint } from './helpers/app-derived.js'
import { getAppEndpoint, getVideoEndpoint } from './helpers/app-derived.js'
const listsOptions = [
@ -121,6 +121,8 @@ export default {
...listsOptions,
videoListOptions
].map(async list => {
// Read saved lists
const methodName = `Reading ${list.path}`
console.time(methodName)
@ -146,8 +148,14 @@ export default {
videoRoutes,
homebrewRoutes
] = lists.map((list, listI) => {
return list.map( app => {
const isVideo = (app.category === undefined)
if (isVideo) {
return getVideoEndpoint(app)
}
return getAppEndpoint(app)
})
})