Skip to content

hmac object changes#121

Merged
srivanimuddineni merged 1 commit intomainfrom
dev/hmacobj-changes
Mar 16, 2026
Merged

hmac object changes#121
srivanimuddineni merged 1 commit intomainfrom
dev/hmacobj-changes

Conversation

@srivanimuddineni
Copy link
Contributor

hmac object changes

@srivanimuddineni srivanimuddineni merged commit 6ef8152 into main Mar 16, 2026
12 checks passed
ClientSubscriptionEntity entity = mapper.mapCreateRequestToEntity(request, clockService.nowOffsetUTC());
entity = entity.toBuilder().clientId(clientId).build();
return mapper.mapEntityToResponse(subscriptionRepository.save(entity));
entity = subscriptionRepository.save(entity);
Copy link
Collaborator

Choose a reason for hiding this comment

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

we prefer immutable objects ... so think would be better to not have line 40 / 43

  1. pass clientId into the builder rather than adding it in a second operation
  2. and get the saved entity back into a new object like 'saved" rather than overwriting the current object.
  3. pass the hmac into the mapper.mapEntityToResponse(entity) so dont need to do line43 updating the response

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.

3 participants