Use Subsonic API to star/unstar

This removes the need to update the annotations on Put(model), removing complexity and making it less buggy
This commit is contained in:
Deluan
2020-10-03 20:06:38 -04:00
parent 47976e13b1
commit abd51b2156
4 changed files with 37 additions and 32 deletions
+5 -1
View File
@@ -26,6 +26,10 @@ const url = (command, id, options) => {
const scrobble = (id, submit) =>
fetchUtils.fetchJson(url('scrobble', id, { submission: submit }))
const star = (id) => fetchUtils.fetchJson(url('star', id))
const unstar = (id) => fetchUtils.fetchJson(url('unstar', id))
const download = (id) => (window.location.href = url('download', id))
export default { url, scrobble, download }
export default { url, scrobble, download, star, unstar }