Fixed dashboard api issue

This commit is contained in:
harish
2024-10-14 19:15:15 +05:30
parent 6cf47741fc
commit b3f654540b

View File

@@ -13,6 +13,7 @@ import net.gepafin.tendermanagement.web.rest.api.errors.ErrorConstants;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
@@ -27,7 +28,7 @@ public interface DashboardApi {
@ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })),
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
@PostMapping(value = "",
@GetMapping(value = "",
produces = { "application/json" })
@PreAuthorize("hasRole('ROLE_SUPER_ADMIN')")
ResponseEntity<Response<SuperAdminWidgetResponseBean>> getDashboardWidgetForSuperAdmin(HttpServletRequest request);
@@ -41,7 +42,7 @@ public interface DashboardApi {
@ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })),
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
@PostMapping(value = "/beneficiary/company/{companyId}",
@GetMapping(value = "/beneficiary/company/{companyId}",
produces = { "application/json" })
ResponseEntity<Response<BeneficiaryWidgetResponseBean>> getDashboardWidgetForBeneficiary(HttpServletRequest request,
@Parameter(description = "The company id", required = true) @PathVariable(value = "companyId", required = true) Long companyId);