implemented restart after installation

This commit is contained in:
Sebastian Sdorra
2019-08-21 11:22:49 +02:00
parent 05d7e0bd1e
commit 25cb0d6a25
8 changed files with 143 additions and 77 deletions

View File

@@ -16,6 +16,7 @@ import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
import java.util.List;
import java.util.Optional;
@@ -90,9 +91,9 @@ public class AvailablePluginResource {
@ResponseCode(code = 200, condition = "success"),
@ResponseCode(code = 500, condition = "internal server error")
})
public Response installPlugin(@PathParam("name") String name) {
public Response installPlugin(@PathParam("name") String name, @QueryParam("restart") boolean restartAfterInstallation) {
PluginPermissions.manage().check();
pluginManager.install(name);
pluginManager.install(name, restartAfterInstallation);
return Response.ok().build();
}
}