mirror of
https://github.com/mgerb/go-discord-bot
synced 2026-01-11 01:22:48 +00:00
statistics tab for discord chat
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import React from 'react';
|
||||
import axios from 'axios';
|
||||
import { axios, StorageService } from '../../services';
|
||||
import queryString from 'query-string';
|
||||
import { RouteComponentProps } from 'react-router-dom';
|
||||
import { storage } from '../../storage';
|
||||
|
||||
interface Props extends RouteComponentProps<any> {}
|
||||
|
||||
@@ -25,7 +24,7 @@ export class Oauth extends React.Component<Props, State> {
|
||||
private async fetchOauth(code: string) {
|
||||
try {
|
||||
const res = await axios.post('/api/oauth', { code });
|
||||
storage.setJWT(res.data);
|
||||
StorageService.setJWT(res.data);
|
||||
window.location.href = '/';
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
||||
Reference in New Issue
Block a user