Fix url in emails, add frontendURL helper (#19)

Fixes #16
This commit is contained in:
Pranav Raj S
2019-08-25 19:59:28 +05:30
committed by GitHub
parent 28fdc062de
commit bd7bd63aae
89 changed files with 550 additions and 398 deletions

View File

@@ -7,6 +7,7 @@
import moment from 'moment';
import Cookies from 'js-cookie';
import endPoints from './endPoints';
import { frontendURL } from '../helper/URLHelper';
export default {
login(creds) {
@@ -65,7 +66,7 @@ export default {
if (error.response.status === 401) {
Cookies.remove('auth_data');
Cookies.remove('user');
window.location = '/login';
window.location = frontendURL('login');
}
reject(error);
});
@@ -80,7 +81,7 @@ export default {
.then(response => {
Cookies.remove('auth_data');
Cookies.remove('user');
window.location = '/u/login';
window.location = frontendURL('login');
resolve(response);
})
.catch(error => {