diff --git a/src/main/java/com/sekwah/advancedportals/repository/DestinationRepository.java b/src/main/java/com/sekwah/advancedportals/repository/DestinationRepository.java index 4cfda0a0..a98b087d 100644 --- a/src/main/java/com/sekwah/advancedportals/repository/DestinationRepository.java +++ b/src/main/java/com/sekwah/advancedportals/repository/DestinationRepository.java @@ -1,4 +1,4 @@ package com.sekwah.advancedportals.repository; -public interface DestinationRepository extends JsonRepository { +public interface DestinationRepository extends JsonRepository { } diff --git a/src/main/java/com/sekwah/advancedportals/services/DestinationServices.java b/src/main/java/com/sekwah/advancedportals/services/DestinationServices.java index d3893ce4..cdbea59b 100644 --- a/src/main/java/com/sekwah/advancedportals/services/DestinationServices.java +++ b/src/main/java/com/sekwah/advancedportals/services/DestinationServices.java @@ -31,12 +31,12 @@ public class DestinationServices { this.destinationRepository = destinationRepository; } - public Response create(String name, Destination destination) { + public Response.Creation create(String name, Destination destination) { if (!destinationRepository.containsKey(name)) { destinationRepository.save(name, destination); - return Response.SUCCESS; + return Response.Creation.SUCCESS; } - return Response.NAME_IN_USE; + return Response.Creation.NAME_IN_USE; } public Boolean delete(String name) { diff --git a/src/main/java/com/sekwah/advancedportals/services/Response.java b/src/main/java/com/sekwah/advancedportals/services/Response.java index 95841cb3..b8b08d28 100644 --- a/src/main/java/com/sekwah/advancedportals/services/Response.java +++ b/src/main/java/com/sekwah/advancedportals/services/Response.java @@ -1,7 +1,10 @@ package com.sekwah.advancedportals.services; -public enum Response { - SUCCESS, - NAME_IN_USE, +public class Response { + + public enum Creation { + SUCCESS, + NAME_IN_USE, + } }