Skip to content

Commit 93a2ea9

Browse files
committed
refactor: use required args constructor for schedule controller
1 parent d563fd1 commit 93a2ea9

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

backend/src/main/java/ca/bc/gov/nrs/ilcr/schedule1/Schedule1Controller.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import ca.bc.gov.nrs.ilcr.schedule1.dto.Schedule1Request;
88
import ca.bc.gov.nrs.ilcr.schedule1.dto.Schedule1Response;
99
import ca.bc.gov.nrs.ilcr.security.SchedulePermissions;
10+
import lombok.RequiredArgsConstructor;
1011
import org.springframework.context.MessageSource;
1112
import org.springframework.context.i18n.LocaleContextHolder;
1213
import org.springframework.http.ResponseEntity;
@@ -21,6 +22,7 @@
2122
* {@code EDIT_SCHEDULE} permission, computed server-side (AD-5).
2223
*/
2324
@RestController
25+
@RequiredArgsConstructor
2426
public class Schedule1Controller implements Schedule1Api {
2527

2628
private static final String SCHEDULE_1_CATEGORY = "1";
@@ -33,17 +35,6 @@ public class Schedule1Controller implements Schedule1Api {
3335
private final SchedulePermissions permissions;
3436
private final MessageSource messageSource;
3537

36-
public Schedule1Controller(
37-
MillContextService millContextService,
38-
Schedule1Service schedule1Service,
39-
SchedulePermissions permissions,
40-
MessageSource messageSource) {
41-
this.millContextService = millContextService;
42-
this.schedule1Service = schedule1Service;
43-
this.permissions = permissions;
44-
this.messageSource = messageSource;
45-
}
46-
4738
/** Resolve a legacy bundle key to verbatim text (AD-8) for a mutating-response success message. */
4839
private MessageInfo message(String key) {
4940
return new MessageInfo(key, messageSource.getMessage(key, null, key, LocaleContextHolder.getLocale()));

0 commit comments

Comments
 (0)