Feature: Implement account deletion (#248)

* Add backend code for user deletion

* Add endpoint and delete user test

* Delete all user content from db

* Delete from playlist_videos table on user deletion

* Avoid raw SQL in unsubscribeResponse()

* Fix unsubscribeResponse()

* Don't delete PlaylistVideos from other users' playlists

* Fix pruneUnusedPlaylistVideos()

* Remove unused commented-out code

* Fix oopsie

* Proper type declaration due to false error-reporting by VSCode

* Use delete query for better performance

* Cleanup and add OneToMany relationship.

* Revert unsubscribe logic.

Co-authored-by: Kavin <20838718+FireMasterK@users.noreply.github.com>
This commit is contained in:
the_4n0nym0u53 2022-05-05 20:51:51 +02:00 committed by GitHub
parent 1bf566b1c7
commit d3d1ee420b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 124 additions and 26 deletions

View file

@ -107,3 +107,6 @@ curl ${CURLOPTS[@]} $HOST/user/playlists/remove -X POST -H "Content-Type: applic
# Delete Playlist Test
curl ${CURLOPTS[@]} $HOST/user/playlists/delete -X POST -H "Content-Type: application/json" -H "Authorization: $AUTH_TOKEN" -d $(jq -n --compact-output --arg playlistId $PLAYLIST_ID '{"playlistId": $playlistId}') || exit 1
# Delete User Test
curl ${CURLOPTS[@]} $HOST/user/delete -X POST -H "Content-Type: application/json" -H "Authorization: $AUTH_TOKEN" -d $(jq -n --compact-output --arg password "$PASS" '{"password": $password}') || exit 1