Home>

I'm creating a site with authorization and I need to make sure that there are no duplicates in the data, for example:

A user with login: FirstUseris already registered on the server, and if some other person tries to create an account with the same login, then he should throw an error.

In principle, I can do before sending a POST request, get the GET request of all users, and find the similarity and if I find it, then throw an error, but I think there is some simple option

On the contrary, it should be expected that the data may inevitably contain duplicates (or some other invalid data) and return accordingly. error while processing POST request.

user78606702022-01-29 20:00:13

And what is the difficulty in checking for duplicates on the server, and sending a refusal if such a login is already taken?

Object4172022-01-28 21:25:41