Code refactor
This commit is contained in:
parent
a7e55cc5bf
commit
b54c561070
2 changed files with 5 additions and 4 deletions
|
@ -32,6 +32,9 @@ interface PlaylistDao {
|
|||
@Query("SELECT * FROM SongEntity WHERE playlist_creator_id = :playlistId")
|
||||
suspend fun getSongs(playlistId: Int): List<SongEntity>
|
||||
|
||||
@Query("DELETE FROM SongEntity WHERE playlist_creator_id = :playlistId AND id = :songId")
|
||||
fun removeSong(playlistId: Int, songId: Int)
|
||||
|
||||
@Delete
|
||||
suspend fun deletePlaylistEntity(playlistEntity: PlaylistEntity)
|
||||
|
||||
|
@ -41,6 +44,4 @@ interface PlaylistDao {
|
|||
@Delete
|
||||
suspend fun removeSongsFromPlaylist(songs: List<SongEntity>)
|
||||
|
||||
@Query("DELETE FROM SongEntity WHERE playlist_creator_id = :playlistId AND id = :songId")
|
||||
fun removeSong(playlistId: Int, songId: Int)
|
||||
}
|
Loading…
Reference in a new issue