Fixed errors
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package erfinderlabyrinth.panel.website.api.interfaces;
|
package erfinderlabyrinth.panel.website.api.interfaces;
|
||||||
|
|
||||||
|
import erfinderlabyrinth.panel.panel.Panel;
|
||||||
import erfinderlabyrinth.panel.website.Connection;
|
import erfinderlabyrinth.panel.website.Connection;
|
||||||
import erfinderlabyrinth.panel.website.Response;
|
import erfinderlabyrinth.panel.website.Response;
|
||||||
import erfinderlabyrinth.panel.website.api.APIInterface;
|
import erfinderlabyrinth.panel.website.api.APIInterface;
|
||||||
@@ -9,10 +10,10 @@ import java.util.HashMap;
|
|||||||
public class SubInterface implements APIInterface {
|
public class SubInterface implements APIInterface {
|
||||||
static HashMap<String, APIInterface> subInterfaces = new HashMap<>();
|
static HashMap<String, APIInterface> subInterfaces = new HashMap<>();
|
||||||
@Override
|
@Override
|
||||||
public Response onCall(String path, Connection.ConnectionType connectionType, byte[] data) {
|
public Response onCall(String path, Connection.ConnectionType connectionType, byte[] data, Panel panel) {
|
||||||
String secondPath = path.split("/")[1];
|
String secondPath = path.split("/")[1];
|
||||||
if (subInterfaces.containsKey(secondPath)) {
|
if (subInterfaces.containsKey(secondPath)) {
|
||||||
return subInterfaces.get(secondPath).onCall(path, connectionType, data);
|
return subInterfaces.get(secondPath).onCall(path, connectionType, data, panel);
|
||||||
}else {
|
}else {
|
||||||
return Response.missing(null);
|
return Response.missing(null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user