Make app endpoints a generated value

This commit is contained in:
Sam Carlton 2020-12-11 14:04:03 -06:00
parent ea17b014af
commit 63c405943e
7 changed files with 56 additions and 20 deletions

View file

@ -4,6 +4,7 @@ import slugify from 'slugify'
import axios from 'axios'
// import { statuses } from './build-app-list'
// import { getAppEndpoint } from './app-derived'
// console.log('process.env.GAMES_SOURCE', process.env.GAMES_SOURCE)
@ -129,16 +130,21 @@ export default async function () {
continue
}
const category = {
slug: 'games'
}
gameList.push({
name: game.Games,
status,
// url: `https://rawg.io/search?query=${encodeURIComponent(game.Games)}`,
text: getStatusText(game),
slug,
endpoint: `/game/${slug}`,
category: {
slug: 'games'
},
// endpoint: getAppEndpoint({
// slug,
// category
// }),//`/game/${slug}`,
category,
content: '',
// relatedLinks: [],
reports: [