diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2ca72e9..4b9d338 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,12 +5,8 @@ - - - - - + @@ -115,6 +119,7 @@ - \ No newline at end of file diff --git a/src/services/register.service.ts b/src/services/register.service.ts index 32d2f48..965645b 100644 --- a/src/services/register.service.ts +++ b/src/services/register.service.ts @@ -4,11 +4,19 @@ import axios from "axios"; async function doRegister(data: object) { - return await axios.post('http://localhost:3333/auth/register', data) + return axios.post('http://localhost:3333/auth/register', data) .then(function (response) { console.log(response); - return response + return { + status: response.status, + data: response.data + } }) + .catch(function (error) { + console.warn(error); + return { + } + }); } export default doRegister; \ No newline at end of file