Skip to content

Commit

Permalink
fix: incorrect parameter type that caused the method not to be found …
Browse files Browse the repository at this point in the history
…when the method was called
  • Loading branch information
Roozenlz committed Oct 26, 2023
1 parent e20ab8f commit 89e5685
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package run.halo.app.theme.finders;

import java.util.Map;
import org.springframework.lang.Nullable;
import reactor.core.publisher.Mono;
import run.halo.app.core.extension.content.Comment;
import run.halo.app.extension.ListResult;
import run.halo.app.extension.Ref;
import run.halo.app.theme.finders.vo.CommentVo;
import run.halo.app.theme.finders.vo.ReplyVo;

Expand All @@ -18,7 +18,7 @@ public interface CommentFinder {

Mono<CommentVo> getByName(String name);

Mono<ListResult<CommentVo>> list(@Nullable Ref ref, @Nullable Integer page,
Mono<ListResult<CommentVo>> list(@Nullable Map<String, String> ref, @Nullable Integer page,
@Nullable Integer size);

Mono<ListResult<ReplyVo>> listReply(String commentName, @Nullable Integer page,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import run.halo.app.theme.finders.Finder;
import run.halo.app.theme.finders.vo.CommentVo;
import run.halo.app.theme.finders.vo.ReplyVo;
import java.util.Map;

/**
* A default implementation of {@link CommentFinder}.
Expand All @@ -28,7 +29,15 @@ public Mono<CommentVo> getByName(String name) {
}

@Override
public Mono<ListResult<CommentVo>> list(Ref ref, Integer page, Integer size) {
public Mono<ListResult<CommentVo>> list(Map<String, String> map, Integer page, Integer size) {
if (map == null) {
return commentPublicQueryService.list(null, page, size);
}
Ref ref = new Ref();
ref.setGroup(map.get("group"));
ref.setVersion(map.get("version"));
ref.setKind(map.get("kind"));
ref.setName(map.get("name"));
return commentPublicQueryService.list(ref, page, size);
}

Expand Down

0 comments on commit 89e5685

Please sign in to comment.