Skip to content

Commit

Permalink
refactor(RelatedUser): Hide isConfirmed from serialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Nov 26, 2024
1 parent 941f34c commit be2f456
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package org.opentripplanner.middleware.models;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.bson.codecs.pojo.annotations.BsonIgnore;

/** A related user is a companion or observer requested by a dependent. */
public class RelatedUser {
public enum RelatedUserStatus {
Expand Down Expand Up @@ -30,6 +33,8 @@ public RelatedUser(String email, RelatedUserStatus status, String nickname, Stri
this.acceptKey = acceptKey;
}

@JsonIgnore
@BsonIgnore
public boolean isConfirmed() {
return status == RelatedUserStatus.CONFIRMED;
}
Expand Down

0 comments on commit be2f456

Please sign in to comment.