Skip to content

feat: implement toggle behavior for user interests#26

Open
ahmed12348 wants to merge 4 commits into
feat/solution-refactor-planfrom
feat/user-interests
Open

feat: implement toggle behavior for user interests#26
ahmed12348 wants to merge 4 commits into
feat/solution-refactor-planfrom
feat/user-interests

Conversation

@ahmed12348
Copy link
Copy Markdown
Collaborator

@ahmed12348 ahmed12348 commented May 17, 2026

Summary

Test plan

  • dotnet test backend/CCE.sln green
  • pnpm nx run-many -t lint,test green
  • If API surface changed: ./scripts/check-contracts-clean.sh green
  • If UI changed: pnpm nx run-many -t e2e (web-portal-e2e + admin-cms-e2e) green
  • Manual smoke notes (if any):

Security checklist

  • No new secrets / credentials in code
  • AuthN / AuthZ impact considered
  • Input validation on new endpoints
  • Audit-log entry for new state-changing operations

BRD traceability

Screenshots / output (optional)

_msg = msg;
}

public async Task<Response<UpsertUserInterestResult>> Handle(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use StringComparer.OrdinalIgnoreCase in Except() to avoid false add/remove detection caused by casing differences.
skipping _service.Update(user) and SaveChangesAsync() when nothing changed can avoid unnecessary db writes.

Comment thread backend/src/CCE.Domain/Identity/User.cs Outdated

/// <summary>
/// Toggles an interest. If it exists it is removed; otherwise it is added.
/// Returns true if added, false if removed.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cheak the usage of this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete it

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.

2 participants