You've already forked AstralRinth
forked from didirus/AstralRinth
More secure custom authentication solution (#126)
* Remove Nuxt Auth from the project, and switch to a custom solution * Replace old testing code * Remove warnings * Add comments to hard to understand function calls in middleware * Use arrow functions
This commit is contained in:
@@ -46,22 +46,14 @@ export default {
|
||||
ModCard,
|
||||
},
|
||||
async asyncData(data) {
|
||||
const config = {
|
||||
headers: {
|
||||
Authorization: data.$auth.getToken('local')
|
||||
? data.$auth.getToken('local')
|
||||
: '',
|
||||
},
|
||||
}
|
||||
|
||||
let res = await axios.get(
|
||||
`https://api.modrinth.com/api/v1/user/${data.$auth.user.id}/mods`,
|
||||
config
|
||||
data.$auth.headers
|
||||
)
|
||||
|
||||
res = await axios.get(
|
||||
`https://api.modrinth.com/api/v1/mods?ids=${JSON.stringify(res.data)}`,
|
||||
config
|
||||
data.$auth.headers
|
||||
)
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user