Skip to content

Commit

Permalink
Made getAll operation of PageController unsupported (#1176)
Browse files Browse the repository at this point in the history
  • Loading branch information
pc9795 committed Oct 15, 2020
1 parent 67ef538 commit 8d2701e
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
import com.appsmith.server.domains.Page;
import com.appsmith.server.dtos.ApplicationPagesDTO;
import com.appsmith.server.dtos.ResponseDTO;
import com.appsmith.server.exceptions.AppsmithError;
import com.appsmith.server.exceptions.AppsmithException;
import com.appsmith.server.services.ApplicationPageService;
import com.appsmith.server.services.PageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
Expand All @@ -18,10 +21,12 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

import javax.validation.Valid;
import java.util.List;

@RestController
@RequestMapping(Url.PAGE_URL)
Expand All @@ -45,6 +50,11 @@ public Mono<ResponseDTO<Page>> create(@Valid @RequestBody Page resource,
.map(created -> new ResponseDTO<>(HttpStatus.CREATED.value(), created, null));
}

@Override
public Mono<ResponseDTO<List<Page>>> getAll(@RequestParam MultiValueMap<String, String> params) {
return Mono.error(new AppsmithException(AppsmithError.UNSUPPORTED_OPERATION));
}

@Deprecated
@GetMapping("/application/{applicationId}")
public Mono<ResponseDTO<ApplicationPagesDTO>> getPageNamesByApplicationId(@PathVariable String applicationId) {
Expand Down

0 comments on commit 8d2701e

Please sign in to comment.