add photo delete logic to user update endpoint

This commit is contained in:
Gregor Vostrak
2026-05-26 13:23:31 +02:00
parent 5b756be058
commit 00ffabe108
3 changed files with 92 additions and 11 deletions

View File

@@ -81,8 +81,15 @@ class UserUpdateRequest extends BaseFormRequest
return $this->has('week_start') ? Weekday::from($this->input('week_start')) : null;
}
public function hasPhotoKey(): bool
{
return $this->has('photo');
}
public function getPhoto(): ?string
{
return $this->has('photo') ? (string) $this->input('photo') : null;
$value = $this->input('photo');
return is_string($value) ? $value : null;
}
}