From 5847806a1648195999a66500b1b43eb86fde5a72 Mon Sep 17 00:00:00 2001 From: Jai A Date: Wed, 2 Dec 2020 13:06:26 -0700 Subject: [PATCH] Allow editing of drafts --- pages/mod/_id/edit.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pages/mod/_id/edit.vue b/pages/mod/_id/edit.vue index 85c1b2a2..06ecf8d9 100644 --- a/pages/mod/_id/edit.vue +++ b/pages/mod/_id/edit.vue @@ -266,6 +266,14 @@ export default { Multiselect, }, async asyncData(data) { + const config = { + headers: { + Authorization: data.$auth.getToken('local') + ? data.$auth.getToken('local') + : '', + }, + } + const [ mod, availableCategories, @@ -275,7 +283,10 @@ export default { // availableDonationPlatforms, ] = ( await Promise.all([ - axios.get(`https://api.modrinth.com/api/v1/mod/${data.params.id}`), + axios.get( + `https://api.modrinth.com/api/v1/mod/${data.params.id}`, + config + ), axios.get(`https://api.modrinth.com/api/v1/tag/category`), axios.get(`https://api.modrinth.com/api/v1/tag/loader`), axios.get(`https://api.modrinth.com/api/v1/tag/game_version`),