O'Reilly logo

Web Development with Clojure by Dmitri Sotnikov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Task F: Account Deletion

When the user decides to delete her account, we need to delete all the user-related information from the database, as well as all the user’s files. Luckily, we already wrote a function to delete individual images and their references. All we have to do is select all images associated with the user and pass them to this function. Then we have to remove the account from the users table and delete the user folder.

The picture-gallery.routes.auth namespace contains the logic related to authentication and user account management. We’ll navigate there and add the logic for account deletion by adding the delete-account-page function.

Account deletion will be applicable only to the user in session, obviously, so we need ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required