mirror of
https://github.com/starshardstudio/peafowl.git
synced 2024-11-25 14:34:20 +00:00
Make JSON API return links to other JSON pages
This commit is contained in:
parent
020e4f413a
commit
b774bd52df
1 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ site.use(fileData({
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
title: data.title,
|
title: data.title,
|
||||||
subtitle: data.subtitle,
|
subtitle: data.subtitle,
|
||||||
lists: site.search.pages("list").map((data) => data.url)
|
lists: site.search.pages("list").map((data) => data.url.replace(".html", ".json"))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
@ -47,7 +47,7 @@ site.use(fileData({
|
||||||
contentizer(data) {
|
contentizer(data) {
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
content: data.content,
|
content: data.content,
|
||||||
items: site.search.pages("game").map((data) => data.url)
|
items: site.search.pages("game").map((data) => data.url.replace(".html", ".json"))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Reference in a new issue