joshsoftware / joshsoftware/code-curiosity-2025

Handling Delete in backend

Open
#6 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Approach :-

1. User Requests Account Deletion
- extract the user_id from the the JWT token.
- update the database set is_deleted= true, deleted_at= current_time
- this marks the account as "soft-deleted".
2. User tries to login again within 90 days.
- during login, after verifying Github OAuth check if the user is soft deleted.
- if deleted_at + 90 days > now then user is within grace period.
- reverse the deletion by deleted = false, deleted_at = NULL.
3. Background Job runs daily.
- run a scheduled Job once a day using cron package.
- it runs the query and permanently deletes the user whose deleted_at timestamp is older than 90 days.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.