Skip to content

Conversation

@harinadh-dasari
Copy link
Contributor

No description provided.

@allustag allustag self-requested a review October 16, 2024 12:43
ChannelConfig channelConfig = ChannelConfig.createFromJsonWithName(json, channelName);
if (channelConfig.getCreationDate()!= null) {
// If the creation date is being modified, throw a 500 error
return Response.status(Response.Status.INTERNAL_SERVER_ERROR)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Haripriya99j As informed earlier, don't introduce new logic instead make use of existing logic. Also, this logic will unnecessarily return error message while creating with creationDate but that is not the requirement. Below is the class already available to perform validation and returns error message. See how we can use make use of it.
https://github.com/flightstats/hub/blob/feature/HUB-1565/src/main/java/com/flightstats/hub/channel/ChannelValidator.java
Write test cases as well to ensure it is working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants