Skip to content

fix: issues in comment_count & subscriptions api#64

Merged
Faraz32123 merged 1 commit intomasterfrom
fix/bug_fixes
Aug 26, 2024
Merged

fix: issues in comment_count & subscriptions api#64
Faraz32123 merged 1 commit intomasterfrom
fix/bug_fixes

Conversation

@Faraz32123
Copy link
Copy Markdown
Contributor

@Faraz32123 Faraz32123 commented Aug 24, 2024

  • comment_count is calculated on run time during API call in a ThreadSerializer and returned in a response. As a result, it does not sync with mongodb data. So it should be updated through a signal or in current implementation of mongo models, comment_count should be adjusted when there's any comment created/deleted. This commit will fix this issue and will update comment_count when comment is created/deleted.
  • fix an issue in user subscriptions get request params validation.
  • fix an issue in field name comment_count in the ThreadSerializer.
  • code refactoring
  • exclude endorsement field in case of get comment data and only save parent_id for child comment. This will keep the responses same for v1 and v2.

- `comment_count` is calculated on run time during API call in a
    `ThreadSerializer` and returned in a response. As a result,
    it does not sync with mongodb data. So it should be updated
    through a signal or in current implementation of mongo models,
    `comment_count` should be adjusted when there's any comment
    created/deleted. This commit will fix this issue and will update
    comment_count when comment is created/deleted.
- fix an issue in user subscriptions get request params validation.
- fix an issue in field name comment_count in the `ThreadSerializer`.
- code refactoring
- exclude endorsement field in case of get comment data
    and only save parent_id for child comment.
    This will keep the responses same for v1 and v2.
@Faraz32123 Faraz32123 merged commit 245c9a6 into master Aug 26, 2024
@Faraz32123 Faraz32123 deleted the fix/bug_fixes branch August 26, 2024 05:33
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