Arquisoft / radarin_en3a

2 stars 1 forks source link

Join restapi with webapp #55

Closed UO225811 closed 3 years ago

irenebello commented 3 years ago

While trying to put together the restapi and the webapp we found an error that we cannot solve really well. The function to add users does not seem to work properly we have an error 400 and a connection refused, we tried to solve this several times but this does not work. Here is the image with the error: WhatsApp Image 2021-04-12 at 00 27 41

How can we solve this? @pglez82

UO225811 commented 3 years ago

I tried executing docker and the database worked well without errors.

image

UO269509 commented 3 years ago

I think, we must change the lines that we use "res.json()" to "res.send()" and probably, all the restapi is going to work.

pglez82 commented 3 years ago

You need to make sure that the /users/add function in the restapi is working property. You can test that using postman. Once you are sure that the restapi call works property, you can move forward and work in the api.