Fix SVGs, cleanup, switch stats backend

This commit is contained in:
Jai A
2020-10-18 20:00:03 -07:00
parent 608ab8f4ad
commit 8cd4cc7d0d
13 changed files with 115 additions and 50 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div></div>
<div>{{ JSON.stringify(mod) }}</div>
</template>
<script>
@@ -7,13 +7,46 @@ import axios from 'axios'
export default {
auth: false,
/*
{ 13:42:51
id: 'kN7Mtmyo',
team: 'eiP0Hzmw',
title: 'Gravestones',
description: 'A gravestones mod for fabric with tons ' +
'of config options, an API, and more!',
body_url: 'https://cdn.modrinth.com/file/modrinth/data/kN7Mtmyo/body.md',
published: '2020-10-16T21:17:54.858156Z',
updated: '2020-10-16T21:17:50.982804Z',
status: 'processing',
downloads: 0,
categories: [
'adventure',
'utility',
'library'
],
versions: [
'XUky61nw'
],
icon_url: 'https://cdn.modrinth.com/file/modrinth/mods/icons/kN7Mtmyo/gravestones.png',
issues_url: null,
source_url: null,
wiki_url: null
}
*/
async asyncData(data) {
const res = await axios.get(
let res = await axios.get(
`https://api.modrinth.com/api/v1/mod/${data.params.id}`
)
const mod = res.data
res = await axios.get(mod.body_url)
console.log(res.data)
return {
mod: res.data,
mod,
modBody: res.data,
}
},
}