Fetch descriptions from origin
This commit is contained in:
parent
343116ea24
commit
d2b26124e4
@ -309,7 +309,11 @@ export default {
|
|||||||
name: mod.license.name,
|
name: mod.license.name,
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await axios.get(mod.body_url)
|
const reg = /.+?:\/\/.+?(\/.+?)(?:#|\?|$)/
|
||||||
|
const urlPath = reg.exec(mod.body_url)[1]
|
||||||
|
const res = await axios.get(
|
||||||
|
`https://modrinth-cdn.nyc3.digitaloceanspaces.com${urlPath}`
|
||||||
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
mod,
|
mod,
|
||||||
|
|||||||
@ -17,7 +17,13 @@ export default {
|
|||||||
components: { ModPage },
|
components: { ModPage },
|
||||||
auth: false,
|
auth: false,
|
||||||
async fetch() {
|
async fetch() {
|
||||||
this.body = (await axios.get(this.mod.body_url)).data
|
const reg = /.+?:\/\/.+?(\/.+?)(?:#|\?|$)/
|
||||||
|
const urlPath = reg.exec(this.mod.body_url)[1]
|
||||||
|
this.body = (
|
||||||
|
await axios.get(
|
||||||
|
`https://modrinth-cdn.nyc3.digitaloceanspaces.com${urlPath}`
|
||||||
|
)
|
||||||
|
).data
|
||||||
},
|
},
|
||||||
async asyncData(data) {
|
async asyncData(data) {
|
||||||
const config = {
|
const config = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user