Skip to content

Commit aa6f557

Browse files
Merge pull request #11 from borkinc/url-fixes
Quick fixes
2 parents 5e76d2c + ab148be commit aa6f557

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/js/actions/chat-actions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function getChats() {
2929
return function (dispatch) {
3030
// const access_token = JSON.parse(localStorage.getItem('user')).access_token;
3131
// TODO: Must get all chats for current user after phase 2.
32-
axios.get(`${process.env.REACT_APP_API_URL}` + 'api/chat/7'
32+
axios.get(`${process.env.REACT_APP_API_URL}` + 'api/chats/7'
3333
// {
3434
// headers: {
3535
// 'Authorization': `Bearer ${access_token}`
@@ -72,7 +72,7 @@ export function toggleContactModal(payload) {
7272
export function getChatMessages(payload) {
7373
return function (dispatch) {
7474
// const access_token = JSON.parse(localStorage.getItem('user')).access_token;
75-
axios.get(`${process.env.REACT_APP_API_URL}` + 'api/chat/' + payload + '/messages'
75+
axios.get(`${process.env.REACT_APP_API_URL}` + 'api/messages'
7676
// {
7777
// headers: {
7878
// 'Authorization': `Bearer ${access_token}`
@@ -114,7 +114,7 @@ export function postMessage(payload) {
114114
data.append('created_on', payload.datePosted);
115115
data.append('img', payload.picture);
116116

117-
axios.post(`${process.env.REACT_APP_API_URL}` + 'api/chat/' + payload.chatID + '/messages', data,)
117+
axios.post(`${process.env.REACT_APP_API_URL}` + 'api/chats/' + payload.chatID + '/messages', data,)
118118
.then(response =>
119119
dispatch({type: POST_MESSAGE, payload, data: response.data}))
120120
}

0 commit comments

Comments
 (0)