parent
20b5188662
commit
70802ff4c9
@ -36,7 +36,7 @@ const Projects = () => {
|
|||||||
fileData.append('file', e.target.files[0]);
|
fileData.append('file', e.target.files[0]);
|
||||||
const accessToken = getAccessToken();
|
const accessToken = getAccessToken();
|
||||||
axios
|
axios
|
||||||
.post('http://localhost:3333/users/me/avatar', fileData, {
|
.post('/users/me/avatar', fileData, {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${accessToken}`,
|
Authorization: `Bearer ${accessToken}`,
|
||||||
},
|
},
|
||||||
|
@ -18,7 +18,7 @@ const profile = {
|
|||||||
id: '1',
|
id: '1',
|
||||||
fullName: 'Jordan Knott',
|
fullName: 'Jordan Knott',
|
||||||
username: 'jordanthedev',
|
username: 'jordanthedev',
|
||||||
profileIcon: { url: 'http://localhost:3333/uploads/headshot.png', bgColor: '#000', initials: 'JK' },
|
profileIcon: { url: '/uploads/headshot.png', bgColor: '#000', initials: 'JK' },
|
||||||
};
|
};
|
||||||
export const Default = () => {
|
export const Default = () => {
|
||||||
return (
|
return (
|
||||||
|
@ -8,7 +8,7 @@ export function getAccessToken() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getNewToken() {
|
export async function getNewToken() {
|
||||||
return fetch('http://localhost:3333/auth/refresh_token', {
|
return fetch('/auth/refresh_token', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
}).then(x => {
|
}).then(x => {
|
||||||
|
Loading…
Reference in New Issue
Block a user