Skip to content
Snippets Groups Projects
Commit aeccdf3d authored by safarte's avatar safarte
Browse files

async

parent 13587dcc
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ import { Container, Message, TextArea, Button, Grid, Divider } from 'semantic-ui ...@@ -5,7 +5,7 @@ import { Container, Message, TextArea, Button, Grid, Divider } from 'semantic-ui
const API_URL = 'http://138.195.142.10'; const API_URL = 'http://138.195.142.10';
const postMessage = (message, board) => { const postMessage = async (message, board) => {
const request_options = { const request_options = {
url : `${API_URL}/messages`, url : `${API_URL}/messages`,
method : 'POST', method : 'POST',
...@@ -15,7 +15,7 @@ const postMessage = (message, board) => { ...@@ -15,7 +15,7 @@ const postMessage = (message, board) => {
boardId: parseInt(board) boardId: parseInt(board)
} }
}; };
return axios.request(request_options); return axios.request(request_options).then(resp => resp.status);
}; };
const getMessagesList = async (board) => { const getMessagesList = async (board) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment