Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backend): ギャラリーの人気の投稿の選出にidを用いるように #12448

Merged

Conversation

zyoshoka
Copy link
Contributor

@zyoshoka zyoshoka commented Nov 25, 2023

What

ギャラリー投稿の featured の選出において、投稿が3日以内であるかの判定に createdAt を用いるのをやめ、ノートのそれと同様に id を用いて判定するようにしました。

Why

Fix: #12444

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Nov 25, 2023
Copy link

codecov bot commented Nov 25, 2023

Codecov Report

Attention: 35 lines in your changes are missing coverage. Please review.

Comparison is base (f7bdf5a) 78.84% compared to head (eb36218) 78.71%.
Report is 6 commits behind head on develop.

Files Patch % Lines
...ckend/src/server/api/endpoints/gallery/featured.ts 30.00% 21 Missing ⚠️
...end/src/server/api/endpoints/gallery/posts/like.ts 28.57% 5 Missing ⚠️
...d/src/server/api/endpoints/gallery/posts/unlike.ts 50.00% 5 Missing ⚠️
packages/backend/src/core/FeaturedService.ts 66.66% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #12448      +/-   ##
===========================================
- Coverage    78.84%   78.71%   -0.13%     
===========================================
  Files          947      947              
  Lines       102897   102958      +61     
  Branches      8315     8295      -20     
===========================================
- Hits         81125    81048      -77     
- Misses       21772    21910     +138     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -33141,6 +33141,28 @@
         "tags": [
           "gallery"
         ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "limit": {
+                    "type": "integer",
+                    "minimum": 1,
+                    "maximum": 100,
+                    "default": 10
+                  },
+                  "untilId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  }
+                }
+              }
+            }
+          }
+        },
         "responses": {
           "200": {
             "description": "OK (with results)",

Get diff files from Workflow Page

@syuilo syuilo merged commit 2ee48ae into misskey-dev:develop Nov 26, 2023
18 checks passed
@syuilo
Copy link
Member

syuilo commented Nov 26, 2023

👍👍👍

@zyoshoka zyoshoka deleted the use-post-id-in-featured-gallery-posts branch May 15, 2024 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gallery/featured endpoint returns 500
2 participants