fix: allowing users to change artist display name.

This commit is contained in:
2023-12-21 15:31:06 -06:00
parent c46664492d
commit bf30235e1d
2 changed files with 7 additions and 0 deletions

View File

@@ -107,6 +107,7 @@ class ArtistController extends Controller
'alby' => ['email'],
'website' => ['url'],
'nasocial' => ['starts_with:@'],
'name' => ['string', 'unique:artists', 'max:255'],
];
$validator = Validator::make($request->all(), $rules);
if ($validator->fails()) {
@@ -118,6 +119,7 @@ class ArtistController extends Controller
$artist->alby = $request->alby;
$artist->website = $request->website;
$artist->nasocial = $request->nasocial;
$artist->name = $request->name;
if ($artist->isDirty()) {
$artist->save();
}