fix(subscription): expose subscription count in skill detail API

Include subscriptionCount in SkillDetailDTO and SkillDetailResponse
so the frontend SubscribeButton receives the updated count after
subscribe/unsubscribe mutations.
This commit is contained in:
dongmucat 2026-04-29 10:56:20 +08:00
parent 62f3c3a0b4
commit 4882abc043
4 changed files with 5 additions and 0 deletions

View file

@ -86,6 +86,7 @@ public class SkillController extends BaseApiController {
detail.status(),
detail.downloadCount(),
detail.starCount(),
detail.subscriptionCount(),
detail.ratingAvg(),
detail.ratingCount(),
detail.hidden(),

View file

@ -14,6 +14,7 @@ public record SkillDetailResponse(
String status,
Long downloadCount,
Integer starCount,
Integer subscriptionCount,
BigDecimal ratingAvg,
Integer ratingCount,
boolean hidden,

View file

@ -67,6 +67,7 @@ public class ReviewSkillDetailAppService {
snapshot.skill().getStatus().name(),
snapshot.skill().getDownloadCount(),
snapshot.skill().getStarCount(),
snapshot.skill().getSubscriptionCount(),
snapshot.skill().getRatingAvg(),
snapshot.skill().getRatingCount(),
snapshot.skill().isHidden(),

View file

@ -94,6 +94,7 @@ public class SkillQueryService {
String status,
Long downloadCount,
Integer starCount,
Integer subscriptionCount,
java.math.BigDecimal ratingAvg,
Integer ratingCount,
boolean hidden,
@ -184,6 +185,7 @@ public class SkillQueryService {
skill.getStatus().name(),
skill.getDownloadCount(),
skill.getStarCount(),
skill.getSubscriptionCount(),
skill.getRatingAvg(),
skill.getRatingCount(),
skill.isHidden(),