Skip to content

feat(crud): complete CRUD with DELETE endpoints - #4

Merged
KRISHNA-24BCS127 merged 1 commit into
basant-gautam:mainfrom
KRISHNA-24BCS127:main
Sep 4, 2026
Merged

feat(crud): complete CRUD with DELETE endpoints#4
KRISHNA-24BCS127 merged 1 commit into
basant-gautam:mainfrom
KRISHNA-24BCS127:main

Conversation

@KRISHNA-24BCS127

Copy link
Copy Markdown
Collaborator

Summary

Completes the CRUD matrix — the DELETE operations were missing from the API. Adds permanent account deletion and teammate entry removal, wired into the dashboard UI and documented in the README.

Changes

  • DELETE /api/profile — authenticated user permanently deletes their own account and all associated sessions (MongoDB + in-memory fallback).
  • DELETE /api/teammates/:id — authenticated deletion of a teammate entry (moderation/cleanup), MongoDB + in-memory fallback.
  • Dashboard UI — added a red "Delete Account" button with a confirm dialog next to Logout; on success it clears the token and returns to signup.
  • README — API reference table updated with both new DELETE endpoints.

Validation

  • Full CRUD lifecycle smoke-tested against the running server:
    • Create: signup returns 201
    • Read: login returns token; profile + teammates list return data
    • Update: profile PUT updates bio/availability
    • Delete: teammate removed; account deleted; follow-up profile/login requests correctly return 401
  • All CI syntax checks pass locally (server.js, public/*.js, scripts/*, utils/*, routes/*)
  • All pages boot and return 200

- Add DELETE /api/profile (permanent account deletion, cleans user sessions)

- Add DELETE /api/teammates/:id (teammate entry removal for moderation/cleanup)

- Handle both MongoDB and in-memory fallback modes consistently

- Wire 'Delete Account' button into dashboard with confirm dialog

- Document new DELETE endpoints in README API reference
@KRISHNA-24BCS127
KRISHNA-24BCS127 merged commit b8ab419 into basant-gautam:main Sep 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant