[backend] Code cleanup

This commit is contained in:
Laura Hausmann 2024-07-22 05:59:45 +02:00
parent c7d0280eb6
commit 1d02ad1073
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -62,7 +62,7 @@ public class AdminController(
public async Task ResetPassword(string id, [FromBody] ResetPasswordRequest request)
{
var settings = await db.UserSettings.FirstOrDefaultAsync(p => p.UserId == id) ??
throw GracefulException.RecordNotFound();
throw GracefulException.RecordNotFound();
if (request.Password.Length < 8)
throw GracefulException.BadRequest("Password must be at least 8 characters long");