File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/main/java/targeter/aim/domain/challenge/repository Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ public Page<ChallengeDto.ChallengeListResponse> paginateSoloByTypeAndKeyword(
271271 .limit (pageable .getPageSize ())
272272 .fetch ();
273273
274- Long total = buildCountSoloQuery (filterType , keyword ).fetchOne ();
274+ Long total = buildCountSoloQuery (userDetails , filterType , keyword ).fetchOne ();
275275
276276 return new PageImpl <>(
277277 enrichDetails (tuples ),
@@ -303,6 +303,7 @@ private JPAQuery<Tuple> buildSoloBaseQuery(
303303 .from (challenge )
304304 .where (
305305 challenge .mode .eq (ChallengeMode .SOLO ),
306+ challenge .host .id .eq (userDetails .getUser ().getId ()),
306307 soloStatusCondition (filterType )
307308 )
308309 .leftJoin (challenge .host ).fetchJoin ()
@@ -319,6 +320,7 @@ private JPAQuery<Tuple> buildSoloBaseQuery(
319320 }
320321
321322 private JPAQuery <Long > buildCountSoloQuery (
323+ UserDetails userDetails ,
322324 ChallengeDto .ChallengeFilterType filterType ,
323325 String keyword
324326 ) {
@@ -327,6 +329,7 @@ private JPAQuery<Long> buildCountSoloQuery(
327329 .from (challenge )
328330 .where (
329331 challenge .mode .eq (ChallengeMode .SOLO ),
332+ challenge .host .id .eq (userDetails .getUser ().getId ()),
330333 soloStatusCondition (filterType )
331334 );
332335
You can’t perform that action at this time.
0 commit comments