Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Rothenbücher committed Oct 14, 2021
1 parent 7eceec7 commit 3fc7487
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions WebContent/assets/js/sender.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
(function() {
function launch(ip, name) {
$.post("rest/start/" + ip, {
$.post("rest/start/" + ip+"?"+$.param({
url: $("#sender").find('#url').val(),
reload: $("#sender").find('#refresh').val(),
}).done(function() {
})).done(function() {
toastr['info']("Started on " + name + " successfully");
}).fail(function() {
toastr['error']("Error on " + name);
});

}

$(document).ready(function() {
Expand Down
5 changes: 3 additions & 2 deletions src/de/michaelkuerbis/presenter/rest/StartREST.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

Expand All @@ -22,10 +23,10 @@
public class StartREST {

@POST
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
//@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Path("/{ip}")
public Response startCast(@PathParam("ip") String ip,
@FormParam("url") String url, @FormParam("reload") int reload) {
@QueryParam("url") String url, @QueryParam("reload") int reload) {

ChromeCast chromecast = new ChromeCast(ip);
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Generated by Maven Integration for Eclipse
#Wed Apr 07 09:53:28 CEST 2021
#Thu Oct 14 13:04:10 CEST 2021
m2e.projectLocation=C\:\\Users\\Rothenb\u00FCcher\\Documents\\GitHub\\Chromecast-Kiosk
m2e.projectName=presenter
groupId=presenter
Expand Down

0 comments on commit 3fc7487

Please sign in to comment.