You've already forked AstralRinth
forked from didirus/AstralRinth
Follows + Reports
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
:members="members"
|
||||
:current-member="currentMember"
|
||||
:link-bar="[['Description', '']]"
|
||||
:user-follows="userFollows"
|
||||
>
|
||||
<div
|
||||
v-compiled-markdown="mod.body"
|
||||
@@ -42,12 +43,18 @@ export default {
|
||||
mod.body = (await axios.get(mod.body_url)).data
|
||||
}
|
||||
|
||||
const [members, featuredVersions] = (
|
||||
const [members, featuredVersions, userFollows] = (
|
||||
await Promise.all([
|
||||
axios.get(`https://api.modrinth.com/api/v1/team/${mod.team}/members`),
|
||||
axios.get(
|
||||
`https://api.modrinth.com/api/v1/mod/${mod.id}/version?featured=true`
|
||||
),
|
||||
axios.get(
|
||||
data.$auth.loggedIn
|
||||
? `https://api.modrinth.com/api/v1/user/${data.$auth.user.id}/follows`
|
||||
: `https://api.modrinth.com`,
|
||||
config
|
||||
),
|
||||
])
|
||||
).map((it) => it.data)
|
||||
|
||||
@@ -75,6 +82,7 @@ export default {
|
||||
featuredVersions,
|
||||
members,
|
||||
currentMember,
|
||||
userFollows: userFollows.name ? null : userFollows,
|
||||
}
|
||||
} catch {
|
||||
data.error({
|
||||
|
||||
Reference in New Issue
Block a user