chore: upgrade default theme. (#624)

pull/625/head
Ryan Wang 2020-03-07 22:54:52 +08:00 committed by GitHub
parent fa50d2d5d6
commit 38b4bb4aeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View File

@ -1,10 +1,10 @@
package run.halo.app.controller.admin.api;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.web.PageableDefault;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import run.halo.app.model.annotation.DisableOnCondition;
import run.halo.app.model.dto.OptionDTO;
@ -52,12 +52,15 @@ public class OptionController {
@GetMapping("map_view")
@ApiOperation("Lists all options with map view")
public Map<String, Object> listAllWithMapView(@RequestParam(value = "key[]", required = false) List<String> keys) {
if (CollectionUtils.isEmpty(keys)) {
return optionService.listOptions();
}
public Map<String, Object> listAllWithMapView() {
return optionService.listOptions();
}
return optionService.listOptions(keys);
@PostMapping("map_view/keys")
@ApiOperation("Lists options with map view by keys")
public Map<String, Object> listAllWithMapView(@RequestBody String keys) {
List<String> parsedKeys = JSON.parseArray(keys, String.class);
return optionService.listOptions(parsedKeys);
}
@GetMapping("list_view")

@ -1 +1 @@
Subproject commit db9da874bf5c07a093c35804c6c70e8e1157dbb0
Subproject commit b1701a85685413c0b3ace8cab21bfe49ffb658bf