usernameHashes on reserve request can't be null

This commit is contained in:
Katherine Yen
2023-02-07 08:44:04 -08:00
committed by GitHub
parent ca7a4abd30
commit 4a3880b5ae
2 changed files with 13 additions and 0 deletions

View File

@@ -11,10 +11,12 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.whispersystems.textsecuregcm.controllers.AccountController;
import org.whispersystems.textsecuregcm.util.ByteArrayBase64UrlAdapter;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
public record ReserveUsernameHashRequest(
@NotNull
@Valid
@Size(min=1, max=AccountController.MAXIMUM_USERNAME_HASHES_LIST_LENGTH)
@JsonSerialize(contentUsing = ByteArrayBase64UrlAdapter.Serializing.class)