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 ...

Get Web Development with Clojure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.