F
F
Furamy2021-03-17 21:55:06
Angular
Furamy, 2021-03-17 21:55:06

Why do all my back requests work but give an error?

I'm doing a project on angular and nest js, at the moment I'm busy with registration and authorization and generally work with users. I wrote a controller that processes my requests and sends a response via @Res(), the response to the request comes and the status code too, but as an error
60524e3f724ac612882585.png
I understand that the point is how I send the response, something with json, but I don’t understand what the problem is
. Just in case, I’ll attach pieces of code
registration component (angular)
60524ff9ad163095657418.png
auth service (angular)
6052502761cc7533044681.png
users service (nest)
60525063f09e3962497864.png
users controller (nest)
60525079cbb66026044764.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
Furamy, 2021-03-17
@Furamy

Well, the problem was just that I was sending the status, but I just had to write .status(...).send({})

A
Alexey Yarkov, 2021-03-17
@yarkov

English in black says that there is a problem with json, and you show us pictures here))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question