You've already forked AstralRinth
forked from didirus/AstralRinth
Fix some moderation bugs
This commit is contained in:
@@ -91,18 +91,27 @@ export default {
|
||||
MFooter,
|
||||
},
|
||||
async asyncData(data) {
|
||||
const config = {
|
||||
headers: {
|
||||
Authorization: data.$auth.getToken('local'),
|
||||
},
|
||||
}
|
||||
|
||||
let res = await axios.get(
|
||||
`https://api.modrinth.com/api/v1/user/${data.params.id}`
|
||||
`https://api.modrinth.com/api/v1/user/${data.params.id}`,
|
||||
config
|
||||
)
|
||||
const user = res.data
|
||||
|
||||
let mods = []
|
||||
res = await axios.get(
|
||||
`https://api.modrinth.com/api/v1/user/${data.params.id}/mods`
|
||||
`https://api.modrinth.com/api/v1/user/${data.params.id}/mods`,
|
||||
config
|
||||
)
|
||||
if (res.data) {
|
||||
res = await axios.get(
|
||||
`https://api.modrinth.com/api/v1/mods?ids=${JSON.stringify(res.data)}`
|
||||
`https://api.modrinth.com/api/v1/mods?ids=${JSON.stringify(res.data)}`,
|
||||
config
|
||||
)
|
||||
mods = res.data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user