Skip to content

Commit

Permalink
Renamed attributes to make them more clear.
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniotarricone committed Dec 13, 2024
1 parent b8941d2 commit 8c406cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,29 @@
public class UpdateClientRequest {
/**
* <p>
* Channel.
* New channel.
* </p>
*/
@JsonProperty(value = AdminJsonPropertyName.CHANNEL)
@Pattern(regexp = ValidationPattern.CHANNEL, message = ErrorCode.CHANNEL_MUST_MATCH_REGEXP_MSG)
private String channel;
private String newChannel;

/**
* <p>
* Client description.
* New client description.
* </p>
*/
@JsonProperty(value = AdminJsonPropertyName.DESCRIPTION)
@NotNull(message = AdminErrorCode.DESCRIPTION_MUST_NOT_BE_NULL_MSG)
@Pattern(regexp = AdminValidationPattern.DESCRIPTION, message = AdminErrorCode.DESCRIPTION_MUST_MATCH_REGEXP_MSG)
private String description;
private String newDescription;

/**
* <p>
* Client subject.
* New client subject.
* </p>
*/
@JsonProperty(value = AdminJsonPropertyName.SUBJECT)
@Pattern(regexp = AdminValidationPattern.SUBJECT, message = AdminErrorCode.SUBJECT_MUST_MATCH_REGEXP_MSG)
private String subject;
private String newSubject;
}
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ public Uni<Response> update(
Log.tracef("Update client %s: %s", clientId, req);
return repository.updateByClientId(
clientId,
req.getChannel(),
req.getDescription(),
req.getSubject())
req.getNewChannel(),
req.getNewDescription(),
req.getNewSubject())
.onFailure().transform(this::onUpdateError)
.map(n -> {
if (n > 0) {
Expand Down

0 comments on commit 8c406cc

Please sign in to comment.