VirtusLab-Open-Source / strapi-plugin-comments

A plugin for Strapi Headless CMS that provides end to end comments feature with their moderation panel, bad words filtering, abuse reporting and more.
MIT License
413 stars 65 forks source link

feat(api): issue #209 - find all by author #213

Closed cyp3rius closed 1 year ago

cyp3rius commented 1 year ago

Ticket

https://github.com/VirtusLab/strapi-plugin-comments/issues/209

Summary

What does this PR do/solve?

Provides ability to filter by author for generic & strapi users

Test Plan

  1. Run you projects with some comments created
  2. Run queries against endpoints:
    • /api/comments/author/:id - Strapi users
    • /api/comments/author/:id/generic - Generic users
  3. You should get comments authored by specific user with related entity attached
codecov-commenter commented 1 year ago

Codecov Report

Merging #213 (e47684a) into master (69293c1) will increase coverage by 0.98%. The diff coverage is 88.33%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
+ Coverage   79.59%   80.58%   +0.98%     
==========================================
  Files          34       35       +1     
  Lines         897      927      +30     
  Branches      302      315      +13     
==========================================
+ Hits          714      747      +33     
+ Misses        179      176       -3     
  Partials        4        4              
Flag Coverage Δ
unittest 80.58% <88.33%> (+0.98%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/services/utils/parsers.ts 85.36% <85.36%> (ø)
server/services/common.ts 84.11% <94.11%> (+3.89%) :arrow_up:
server/services/utils/functions.ts 82.27% <100.00%> (ø)
server/utils/constants.ts 100.00% <100.00%> (ø)