refactor api controller to internalize server fetch

This commit is contained in:
jeffvli
2025-11-02 21:56:35 -08:00
parent 8dbaec3943
commit c7a473d864
79 changed files with 904 additions and 399 deletions
@@ -21,7 +21,7 @@ interface SaveAsPlaylistFormProps {
body: Partial<CreatePlaylistBody>;
onCancel: () => void;
onSuccess: (data: CreatePlaylistResponse) => void;
serverId: string | undefined;
serverId?: string;
}
export const SaveAsPlaylistForm = ({
@@ -50,7 +50,7 @@ export const SaveAsPlaylistForm = ({
const handleSubmit = form.onSubmit((values) => {
mutation.mutate(
{ body: values, serverId },
{ apiClientProps: { serverId: serverId || '' }, body: values },
{
onError: (err) => {
toast.error({