Add landing page data for statistics & contributors

This commit is contained in:
venashial
2022-07-29 13:44:34 -07:00
parent fba6dd750d
commit 0e1c7cd8ed
3 changed files with 91 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ export async function fetch(route, options = {}) {
if (!version) {
version = JSON.parse(await fs.readFile('./package.json', 'utf8')).version
}
return baseFetch(API_URL + route, {
return baseFetch((route.startsWith('http') ? '' : API_URL) + route, {
...options,
headers: {
'user-agent': `Omorphia / ${version} (venashial@modrinth.com)`,