Skip to content

Commit a24aa1a

Browse files
committed
AYS-467 | @CheckEmergencyEvacuationApplicationActivity Annotation Has Been Used in POST - /api/v1/emergency-evacuation-application Endpoint
1 parent 2a455bb commit a24aa1a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/ays/emergency_application/controller/EmergencyEvacuationApplicationController.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.ays.emergency_application.model.response.EmergencyEvacuationApplicationResponse;
1515
import org.ays.emergency_application.model.response.EmergencyEvacuationApplicationsResponse;
1616
import org.ays.emergency_application.service.EmergencyEvacuationApplicationService;
17+
import org.ays.emergency_application.util.annotation.CheckEmergencyEvacuationApplicationActivity;
1718
import org.hibernate.validator.constraints.UUID;
1819
import org.springframework.security.access.prepost.PreAuthorize;
1920
import org.springframework.validation.annotation.Validated;
@@ -77,6 +78,7 @@ public AysResponse<EmergencyEvacuationApplicationResponse> findById(@PathVariabl
7778
return AysResponse.successOf(emergencyEvacuationApplicationResponse);
7879
}
7980

81+
8082
/**
8183
* Endpoint to create a new emergency evacuation application.
8284
* This method accepts a POST request with the emergency evacuation application details in the request body.
@@ -85,6 +87,7 @@ public AysResponse<EmergencyEvacuationApplicationResponse> findById(@PathVariabl
8587
* @param emergencyEvacuationApplicationRequest the details of the emergency evacuation application
8688
* @return a response indicating the success of the operation
8789
*/
90+
@CheckEmergencyEvacuationApplicationActivity
8891
@PostMapping("/emergency-evacuation-application")
8992
public AysResponse<Void> create(@RequestBody @Valid EmergencyEvacuationApplicationRequest emergencyEvacuationApplicationRequest) {
9093
emergencyEvacuationApplicationService.create(emergencyEvacuationApplicationRequest);
@@ -101,7 +104,7 @@ public AysResponse<Void> create(@RequestBody @Valid EmergencyEvacuationApplicati
101104
* The user must have the authority 'application:evacuation:update' to access this endpoint.
102105
* </p>
103106
*
104-
* @param id the unique identifier of the Emergency Evacuation Application to be updated
107+
* @param id the unique identifier of the Emergency Evacuation Application to be updated
105108
* @param updateRequest the request object containing the details to update the Emergency Evacuation Application
106109
* @return a response indicating the success of the update operation
107110
*/

0 commit comments

Comments
 (0)