Skip to content

Commit

Permalink
edit index.vue
Browse files Browse the repository at this point in the history
add setHeader
  • Loading branch information
mijinco0612 committed Jul 6, 2018
1 parent a5929e2 commit eb28c0e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pages/index.vue
Expand Up @@ -23,7 +23,6 @@
<button class="button is-link is-outlined" @click="pingPrivate">ping private</button>
</p>
</div>

<div class="box">
<article class="media">
<div class="media-content">
Expand All @@ -33,7 +32,6 @@
</div>
</article>
</div>

</div>
</section>
</template>
Expand All @@ -52,6 +50,7 @@
this.message = returnMessage;
},
async pingPrivate() {
this.$axios.setHeader('Authorization', 'Bearer ' + this.$auth0.getIdToken());
const returnMessage = await this.$axios.$get('/api/v1/private');
this.message = returnMessage;
}
Expand Down

0 comments on commit eb28c0e

Please sign in to comment.