Fix item route responses

Also avoid storing empty strings in a nullable field.
This commit is contained in:
Eike Kettner
2020-01-11 01:51:05 +01:00
parent 2ecfb679d9
commit 88efe13209
2 changed files with 11 additions and 5 deletions

View File

@ -32,7 +32,7 @@ object Ident {
def fromString(s: String): Either[String, Ident] =
if (s.forall(chars.contains)) Right(new Ident(s))
else Left(s"Invalid identifier: $s. Allowed chars: ${chars.mkString}")
else Left(s"Invalid identifier: '$s'. Allowed chars: ${chars.toList.sorted.mkString}")
def fromBytes(bytes: ByteVector): Ident =
unsafe(bytes.toBase58)