mirror of https://github.com/halo-dev/halo
chore: upgrade default theme. (#624)
parent
fa50d2d5d6
commit
38b4bb4aeb
|
@ -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
|
Loading…
Reference in New Issue