feat(backend): return unlisted status in partial member for authenticated users

This commit is contained in:
sam 2024-09-25 19:48:05 +02:00
parent bb649d1d72
commit f81ae97821
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
15 changed files with 68 additions and 53 deletions

View file

@ -79,7 +79,7 @@ public static class AuthUtils
return false;
}
}
public static bool TryParseToken(string? input, out byte[] rawToken)
{
rawToken = [];

View file

@ -156,7 +156,8 @@ public static class ValidationUtils
break;
}
errors = errors.Concat(ValidateFieldEntries(field.Entries, customPreferences, $"fields.{index}.entries")).ToList();
errors = errors.Concat(ValidateFieldEntries(field.Entries, customPreferences, $"fields.{index}.entries"))
.ToList();
}
return errors;
@ -238,12 +239,14 @@ public static class ValidationUtils
{
case > Limits.FieldEntryTextLimit:
errors.Add(($"{errorPrefix}.{entryIdx}.value",
ValidationError.LengthError("Pronoun display text is too long", 1, Limits.FieldEntryTextLimit,
ValidationError.LengthError("Pronoun display text is too long", 1,
Limits.FieldEntryTextLimit,
entry.Value.Length)));
break;
case < 1:
errors.Add(($"{errorPrefix}.{entryIdx}.value",
ValidationError.LengthError("Pronoun display text is too short", 1, Limits.FieldEntryTextLimit,
ValidationError.LengthError("Pronoun display text is too short", 1,
Limits.FieldEntryTextLimit,
entry.Value.Length)));
break;
}