Unfollow via hx-swap=delete
This commit is contained in:
@@ -76,7 +76,7 @@ public class ArtistResource {
|
|||||||
@Path("/{mbid}")
|
@Path("/{mbid}")
|
||||||
public Response unfollow(@PathParam("mbid") String mbid) {
|
public Response unfollow(@PathParam("mbid") String mbid) {
|
||||||
artistService.unfollow(mbid);
|
artistService.unfollow(mbid);
|
||||||
return Response.noContent().build();
|
return Response.ok("").build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<button class="btn btn-ghost btn-xs text-error"
|
<button class="btn btn-ghost btn-xs text-error"
|
||||||
hx-delete="/artists/{artist.mbid}"
|
hx-delete="/artists/{artist.mbid}"
|
||||||
hx-target="#artist-{artist.mbid}"
|
hx-target="#artist-{artist.mbid}"
|
||||||
hx-swap="outerHTML"
|
hx-swap="delete"
|
||||||
hx-on::after-request="DiscDrop.refreshFeed()">
|
hx-on::after-request="DiscDrop.refreshFeed()">
|
||||||
Unfollow
|
Unfollow
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user