- Timestamp:
- 02/15/26 23:28:14 (5 months ago)
- Branches:
- main
- Children:
- 615dcee, c807e22
- Parents:
- c8baad1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/components/playlist/CreatePlaylistModal.tsx
rc8baad1 rd1ee039 8 8 onClose, 9 9 onSuccess, 10 songId, 10 11 }: CreatePlaylistModalProps) => { 11 12 const [playlistName, setPlaylistName] = useState(""); … … 39 40 setIsSubmitting(true); 40 41 try { 41 await axiosInstance.post( 42 `/playlists?playlistName=${encodeURIComponent(playlistName.trim())}`, 43 ); 42 await axiosInstance.post("/playlists", null, { 43 params: { 44 playlistName: playlistName.trim(), 45 ...(songId != null && { songId }), 46 }, 47 }); 48 44 49 toast.success("Playlist created successfully!"); 45 onSuccess();50 await onSuccess(); 46 51 handleClose(); 47 52 } catch (err: any) {
Note:
See TracChangeset
for help on using the changeset viewer.
