feat(backend): add DELETE /users/@me endpoint

This commit is contained in:
Sam 2023-03-08 10:32:18 +01:00
parent c4b8b26ec7
commit ff3d612b06
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
9 changed files with 162 additions and 45 deletions

View file

@ -0,0 +1,10 @@
-- +migrate Up
-- 2023-03-07: add delete functionality
-- if not null, the user is soft deleted
alter table users add column deleted_at timestamptz;
-- if true, the user deleted their account themselves + should have option to reactivate; should also be deleted after 30 days
alter table users add column self_delete boolean;
-- delete reason if the user was deleted by a moderator
alter table users add column delete_reason text;