mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Use whole word regex matches for descriptions
This commit is contained in:
parent
fa222d3116
commit
d434b19c9b
5 changed files with 74 additions and 41 deletions
|
|
@ -70,21 +70,16 @@ export default {
|
|||
},
|
||||
async asyncData ({ params: { slug } }) {
|
||||
|
||||
const { allVideoList } = await import('~/helpers/get-list.js')
|
||||
const { default: videoList } = await import('~/static/video-list.json')
|
||||
const { allVideoAppsList } = await import('~/helpers/get-list.js')
|
||||
// const { default: videoList } = await import('~/static/video-list.json')
|
||||
|
||||
const app = allVideoList.find(app => (app.slug === slug))
|
||||
const { videosRelatedToApp } = await import('~/helpers/related.js')
|
||||
|
||||
const app = allVideoAppsList.find(app => (app.slug === slug))
|
||||
|
||||
// const featuredApps = []
|
||||
|
||||
const relatedVideos = []
|
||||
|
||||
// Find other videos that also feature this video's app
|
||||
for (const video of videoList) {
|
||||
if (!video.apps.includes(app.slug)) continue
|
||||
|
||||
relatedVideos.push(video)
|
||||
}
|
||||
const relatedVideos = videosRelatedToApp( app )
|
||||
|
||||
return {
|
||||
app,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue