Skip to content

Commit

Permalink
Merge pull request #11 from borkinc/url-fixes
Browse files Browse the repository at this point in the history
Quick fixes
  • Loading branch information
ChristianPerez34 authored Apr 8, 2019
2 parents 5e76d2c + ab148be commit aa6f557
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/actions/chat-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function getChats() {
return function (dispatch) {
// const access_token = JSON.parse(localStorage.getItem('user')).access_token;
// TODO: Must get all chats for current user after phase 2.
axios.get(`${process.env.REACT_APP_API_URL}` + 'api/chat/7'
axios.get(`${process.env.REACT_APP_API_URL}` + 'api/chats/7'
// {
// headers: {
// 'Authorization': `Bearer ${access_token}`
Expand Down Expand Up @@ -72,7 +72,7 @@ export function toggleContactModal(payload) {
export function getChatMessages(payload) {
return function (dispatch) {
// const access_token = JSON.parse(localStorage.getItem('user')).access_token;
axios.get(`${process.env.REACT_APP_API_URL}` + 'api/chat/' + payload + '/messages'
axios.get(`${process.env.REACT_APP_API_URL}` + 'api/messages'
// {
// headers: {
// 'Authorization': `Bearer ${access_token}`
Expand Down Expand Up @@ -114,7 +114,7 @@ export function postMessage(payload) {
data.append('created_on', payload.datePosted);
data.append('img', payload.picture);

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

0 comments on commit aa6f557

Please sign in to comment.