From d581f78732da963cabe4531e98eb572deb9cd184 Mon Sep 17 00:00:00 2001 From: Gabe Farrell Date: Sun, 11 Jan 2026 01:46:22 -0500 Subject: [PATCH] feat: add endpoint and ui to update mbz id --- client/app/components/modals/EditModal/UpdateMbzID.tsx | 5 +++-- engine/routes.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/app/components/modals/EditModal/UpdateMbzID.tsx b/client/app/components/modals/EditModal/UpdateMbzID.tsx index d1191a4..0654cc1 100644 --- a/client/app/components/modals/EditModal/UpdateMbzID.tsx +++ b/client/app/components/modals/EditModal/UpdateMbzID.tsx @@ -23,6 +23,7 @@ export default function UpdateMbzID({ type, id }: Props) { setLoading(true); updateMbzId(type, id, input).then((r) => { if (r.ok) { + setSuccess("successfully updated MusicBrainz ID"); } else { r.json().then((r) => setError(r.error)); } @@ -44,9 +45,9 @@ export default function UpdateMbzID({ type, id }: Props) { Submit - {err &&

{err}

} - {success &&

{success}

} + {err &&

{err}

} + {success &&

{success}

} ); } diff --git a/engine/routes.go b/engine/routes.go index d38052a..54100ed 100644 --- a/engine/routes.go +++ b/engine/routes.go @@ -94,7 +94,7 @@ func bindRoutes( r.Post("/aliases", handlers.CreateAliasHandler(db)) r.Post("/aliases/delete", handlers.DeleteAliasHandler(db)) r.Post("/aliases/primary", handlers.SetPrimaryAliasHandler(db)) - r.Patch("/mbzid", handlers.UpdateAlbumHandler(db)) + r.Patch("/mbzid", handlers.UpdateMbzIdHandler(db)) r.Get("/user/apikeys", handlers.GetApiKeysHandler(db)) r.Post("/user/apikeys", handlers.GenerateApiKeyHandler(db)) r.Patch("/user/apikeys", handlers.UpdateApiKeyLabelHandler(db))