From the course: Mastering Nest.js: Build Scalable Applications with Mastery in Nest.js Framework

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Finalizing MyStore application

Finalizing MyStore application

In this lecture, we are going to finalize the my store application by adding a few updates which are going to make the app more user friendly. Currently, when the user is registered to the database, the page directly takes them to the login without any message like user is registered or something related to that. And when the existing user tries to sign up again, then also there should be an appropriate message displayed. So let's implement these functionalities and finish up the project. Inside the signup route of the post handler, we will first check for the existing user. So let me give a try block where I'll create a constant existing user and assign the await this dot user service, find user by username method, and pass the username property. This is going to find the user, and if the username is found in the database, then we simply return that is redirect the page to sign up. Let me give the response decorator and the response property first, and then I redirect the page to…

Contents