Skip to content

Commit

Permalink
feat: add gravatar source field for comment options api. (halo-dev#1333)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby authored Mar 29, 2021
1 parent 602f170 commit 359c01c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import run.halo.app.model.dto.OptionDTO;
import run.halo.app.model.properties.CommentProperties;
import run.halo.app.model.support.BaseResponse;
import run.halo.app.service.OptionService;

Expand Down Expand Up @@ -60,8 +61,9 @@ public BaseResponse<Object> getBy(@PathVariable("key") String key) {
@ApiOperation("Options for comment")
public Map<String, Object> comment() {
List<String> keys = new ArrayList<>();
keys.add("comment_gravatar_default");
keys.add("comment_content_placeholder");
keys.add(CommentProperties.GRAVATAR_DEFAULT.getValue());
keys.add(CommentProperties.CONTENT_PLACEHOLDER.getValue());
keys.add(CommentProperties.GRAVATAR_SOURCE.getValue());
return optionService.listOptions(keys);
}
}

0 comments on commit 359c01c

Please sign in to comment.