Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge(albums_api): add api endpoints for albums & tests. #3

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

Comment on lines +34 to +39
for track in album.tracks.iter() {
tx.execute(
"INSERT INTO album_tracks (album_id, track_id) VALUES (?1, ?2)",
params![album.id, track],
)?;
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be tested.
It can't be done yet because no track endpoints have been implemented, but it does need to happen when they are.

Comment on lines +172 to +174
tx.execute("DELETE FROM album_genres WHERE album_id = ?", params![id])?;
tx.execute("DELETE FROM artist_albums WHERE album_id = ?", params![id])?;
tx.execute("DELETE FROM album_tracks WHERE album_id = ?", params![id])?;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These also need to be tested. They are fairly straight forward, so I think that can be left until after the track apis are implemented. Though there is currently no plan for an endpoint that could test the genre album junctions... the joy of using exclusively e2e testing...

@5-pebbles 5-pebbles merged commit 0afd8c1 into main Mar 6, 2024
1 check passed
@5-pebbles 5-pebbles deleted the album_apis branch March 6, 2024 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant