Remove trailing comma from artist id field

This commit is contained in:
Ethan Girouard 2024-05-16 20:59:38 -04:00
parent 4958d3a881
commit 3c9ae521b1
Signed by: eta357
GPG Key ID: 7BCDC36DFD11C146

View File

@ -35,7 +35,7 @@ async fn validate_artist_ids(artist_ids: Field<'static>) -> Result<Vec<i32>, Ser
// Extract the artist id from the field // Extract the artist id from the field
match artist_ids.text().await { match artist_ids.text().await {
Ok(artist_ids) => { Ok(artist_ids) => {
let artist_ids = artist_ids.split(','); let artist_ids = artist_ids.trim_end_matches(',').split(',');
artist_ids.map(|artist_id| { artist_ids.map(|artist_id| {
// Parse the artist id as an integer // Parse the artist id as an integer