Implemented an API to suspend a Contact #66

Merged
vikas.nale merged 2 commits from Ashutosh_Task#263_Delete_Contact into Feature_Directory 2025-05-22 06:13:50 +00:00
Collaborator
  • Authentication & Authorization:
    • Retrieves the current tenant ID and the logged-in employee to ensure the operation is tenant-scoped and auditable.
  • Validation:
    • Checks that the provided contact ID is not empty.
    • Attempts to find the contact within the tenant using the provided ID.
  • Soft Deletion:
    • If the contact exists, it sets IsActive = false, effectively performing a soft delete (preserving data for potential recovery or auditing).
    • Saves the change to the database.
  • Logging and Response:
    • Logs the successful deletion with the employee's ID.
    • Returns a 200 OK response with an empty object and a success message.
    • If the contact is not found, it logs a warning and returns a 404 Not Found.
    • If the ID is invalid or empty, it logs that and returns a 400 Bad Request.
- **Authentication & Authorization**: - Retrieves the current tenant ID and the logged-in employee to ensure the operation is tenant-scoped and auditable. - **Validation**: - Checks that the provided contact ID is not empty. - Attempts to find the contact within the tenant using the provided ID. - **Soft Deletion**: - If the contact exists, it sets IsActive = false, effectively performing a soft delete (preserving data for potential recovery or auditing). - Saves the change to the database. - **Logging and Response**: - Logs the successful deletion with the employee's ID. - Returns a 200 OK response with an empty object and a success message. - If the contact is not found, it logs a warning and returns a 404 Not Found. - If the ID is invalid or empty, it logs that and returns a 400 Bad Request.
ashutosh.nehete added 1 commit 2025-05-21 12:11:51 +00:00
ashutosh.nehete added 1 commit 2025-05-21 13:05:11 +00:00
Added entrie to DirectoryUpdateLog Table
vikas.nale merged commit f6027131e3 into Feature_Directory 2025-05-22 06:13:50 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/marco.pms.api#66
No description provided.