1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-11 09:32:50 +00:00

statistics tab for discord chat

This commit is contained in:
2018-04-10 21:51:45 -05:00
parent 27a42f1b99
commit 5fa0f1ac2e
22 changed files with 281 additions and 34 deletions

View File

@@ -0,0 +1,19 @@
import ax from 'axios';
import { StorageService } from './storage.service';
export const axios = ax.create();
axios.interceptors.request.use(
config => {
const jwt = StorageService.getJWT();
if (jwt) {
config.headers['Authorization'] = `Bearer ${jwt}`;
}
// Do something before request is sent
return config;
},
function(error) {
// Do something with request error
return Promise.reject(error);
},
);