geforkt von SteamWar/BungeeCore
Update some stuff
Dieser Commit ist enthalten in:
Ursprung
e4551e9521
Commit
00da5f673d
@ -23,8 +23,8 @@ import com.google.gson.JsonObject;
|
||||
import de.steamwar.bungeecore.api.v1.ServerstatusEndPoint;
|
||||
import de.steamwar.bungeecore.api.v1.ServerteamEndPoint;
|
||||
import de.steamwar.bungeecore.api.v1.statistics.*;
|
||||
import de.steamwar.bungeecore.api.v1.user.GetUuidEndPoint;
|
||||
import de.steamwar.bungeecore.api.v1.user.GetUsernameEndPoint;
|
||||
import de.steamwar.bungeecore.api.v1.user.GetUuidEndPoint;
|
||||
import de.steamwar.bungeecore.api.v1.website.LoginEndPoint;
|
||||
import de.steamwar.bungeecore.api.v1.website.LogoutEndPoint;
|
||||
|
||||
@ -33,7 +33,7 @@ import static spark.Spark.post;
|
||||
|
||||
public class WebAPI {
|
||||
|
||||
private static EndPoint[] endPoints = new EndPoint[] {
|
||||
private static EndPoint[] endPointsV1 = new EndPoint[] {
|
||||
new FightsEndPoint(),
|
||||
new HoursContributedEndPoint(),
|
||||
new HoursPlayedEndPoint(),
|
||||
@ -47,9 +47,7 @@ public class WebAPI {
|
||||
new ServerteamEndPoint(),
|
||||
};
|
||||
|
||||
public static void start() {
|
||||
port(1024);
|
||||
|
||||
private static void register(EndPoint[] endPoints) {
|
||||
for (EndPoint endPoint : endPoints) {
|
||||
post(endPoint.path(), (request, response) -> {
|
||||
JsonObject result = endPoint.result(request, response);
|
||||
@ -61,4 +59,10 @@ public class WebAPI {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static void start() {
|
||||
port(1024);
|
||||
|
||||
register(endPointsV1);
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren