Fix some import issues + finish route ordering

This commit is contained in:
Colin McDonald 2016-04-30 20:43:55 -04:00
parent 390fd4aecc
commit 84b4a184ed
10 changed files with 43 additions and 22 deletions

View File

@ -19,16 +19,23 @@ import net.frozenorb.apiv3.routes.grants.GETGrants;
import net.frozenorb.apiv3.routes.grants.GETUserGrants;
import net.frozenorb.apiv3.routes.grants.POSTUserGrant;
import net.frozenorb.apiv3.routes.ipLog.GETUserIPLog;
import net.frozenorb.apiv3.routes.notificationTemplate.DELETENotificationTemplate;
import net.frozenorb.apiv3.routes.notificationTemplate.GETNotificationTemplate;
import net.frozenorb.apiv3.routes.notificationTemplate.GETNotificationTemplates;
import net.frozenorb.apiv3.routes.notificationTemplate.POSTNotificationTemplate;
import net.frozenorb.apiv3.routes.punishments.DELETEPunishment;
import net.frozenorb.apiv3.routes.punishments.GETPunishment;
import net.frozenorb.apiv3.routes.punishments.GETPunishments;
import net.frozenorb.apiv3.routes.punishments.POSTUserPunish;
import net.frozenorb.apiv3.routes.ranks.DELETERank;
import net.frozenorb.apiv3.routes.ranks.GETRank;
import net.frozenorb.apiv3.routes.ranks.GETRanks;
import net.frozenorb.apiv3.routes.ranks.POSTRank;
import net.frozenorb.apiv3.routes.serverGroups.DELETEServerGroup;
import net.frozenorb.apiv3.routes.serverGroups.GETServerGroup;
import net.frozenorb.apiv3.routes.serverGroups.GETServerGroups;
import net.frozenorb.apiv3.routes.servers.GETServer;
import net.frozenorb.apiv3.routes.servers.GETServers;
import net.frozenorb.apiv3.routes.servers.POSTServerHeartbeat;
import net.frozenorb.apiv3.routes.serverGroups.POSTServerGroup;
import net.frozenorb.apiv3.routes.servers.*;
import net.frozenorb.apiv3.routes.users.*;
import net.frozenorb.apiv3.serialization.FollowAnnotationExclusionStrategy;
import net.frozenorb.apiv3.serialization.ObjectIdTypeAdapter;
@ -96,32 +103,55 @@ public final class APIv3 {
get("/announcements", new GETAnnouncements(), gson::toJson);
get("/auditLog", new GETAuditLog(), gson::toJson);
get("/chatFilterList", new GETChatFilterList(), gson::toJson);
delete("/grant/:id", new DELETEGrant(), gson::toJson);
get("/grants", new GETGrants(), gson::toJson);
get("/user/:id/grants", new GETUserGrants(), gson::toJson);
post("/user/:id:/grant", new POSTUserGrant(), gson::toJson);
get("/user/:id/ipLog", new GETUserIPLog(), gson::toJson);
delete("/punishment/:id", new DELETEPunishment(), gson::toJson);
delete("/grant/:id", new DELETEGrant(), gson::toJson);
get("/notificationTemplate/:id", new GETNotificationTemplate(), gson::toJson);
get("/notificationTemplates", new GETNotificationTemplates(), gson::toJson);
post("/notificationTemplate", new POSTNotificationTemplate(), gson::toJson);
//put("/notificationTemplate/:id", new PUTNotificationTemplate(), gson::toJson);
delete("/notificationTemplate/:id", new DELETENotificationTemplate(), gson::toJson);
get("/punishment/:id", new GETPunishment(), gson::toJson);
get("/punishments", new GETPunishments(), gson::toJson);
post("/user/:id:/punish", new POSTUserPunish(), gson::toJson);
delete("/punishment/:id", new DELETEPunishment(), gson::toJson);
get("/rank/:id", new GETRank(), gson::toJson);
get("/ranks", new GETRanks(), gson::toJson);
post("/rank", new POSTRank(), gson::toJson);
//put("/rank/:id", new PUTRank(), gson::toJson);
delete("/rank/:id", new DELETERank(), gson::toJson);
delete("/serverGroup/:id", new DELETEServerGroup(), gson::toJson);
get("/serverGroup/:id", new GETServerGroup(), gson::toJson);
get("/serverGroups", new GETServerGroups(), gson::toJson);
post("/serverGroup", new POSTServerGroup(), gson::toJson);
//put("/serverGroup/:id", new PUTServerGroup(), gson::toJson);
get("/server/:id", new GETServer(), gson::toJson);
get("/servers", new GETServers(), gson::toJson);
post("/server/heartbeat", new POSTServerHeartbeat(), gson::toJson);
delete("/user/:id/meta", new DELETEUserMeta(), gson::toJson);
post("/server", new POSTServer(), gson::toJson);
//put("/server/:id", new PUTServer(), gson::toJson);
delete("/server/:id", new DELETEServer(), gson::toJson);
get("/dump/:type", new GETDump(), gson::toJson);
get("/staff", new GETStaff(), gson::toJson);
get("/user/:id", new GETUser(), gson::toJson);
get("/user/:id/details", new GETUserDetails(), gson::toJson);
get("/user/:id/meta/:serverGroup", new GETUserMeta(), gson::toJson);
post("/user/confirmRegister/:emailToken", new POSTUserConfirmRegister(), gson::toJson);
get("/user/:id/grants", new GETUserGrants(), gson::toJson);
get("/user/:id/ipLog", new GETUserIPLog(), gson::toJson);
get("/user/:id", new GETUser(), gson::toJson);
post("/user/:id:/grant", new POSTUserGrant(), gson::toJson);
post("/user/:id:/punish", new POSTUserPunish(), gson::toJson);
post("/user/:id/loginInfo", new POSTUserLoginInfo(), gson::toJson);
post("/user/:id/notify", new POSTUserNotify(), gson::toJson);
post("/user/:id/register", new POSTUserRegister(), gson::toJson);
post("/user/confirmRegister/:emailToken", new POSTUserConfirmRegister(), gson::toJson);
put("/user/:id/meta/:serverGroup", new PUTUserMeta(), gson::toJson);
get("/dump/:type", new GETDump(), gson::toJson);
delete("/user/:id/meta", new DELETEUserMeta(), gson::toJson);
}
}

View File

@ -2,7 +2,6 @@ package net.frozenorb.apiv3.routes.auditLog;
import net.frozenorb.apiv3.APIv3;
import net.frozenorb.apiv3.models.AuditLogEntry;
import net.frozenorb.apiv3.models.Grant;
import spark.Request;
import spark.Response;
import spark.Route;

View File

@ -1,7 +1,6 @@
package net.frozenorb.apiv3.routes.notificationTemplate;
import net.frozenorb.apiv3.models.NotificationTemplate;
import net.frozenorb.apiv3.models.Rank;
import net.frozenorb.apiv3.utils.ErrorUtils;
import spark.Request;
import spark.Response;

View File

@ -1,7 +1,6 @@
package net.frozenorb.apiv3.routes.notificationTemplate;
import net.frozenorb.apiv3.models.NotificationTemplate;
import net.frozenorb.apiv3.models.Rank;
import spark.Request;
import spark.Response;
import spark.Route;

View File

@ -1,7 +1,6 @@
package net.frozenorb.apiv3.routes.notificationTemplate;
import net.frozenorb.apiv3.models.NotificationTemplate;
import net.frozenorb.apiv3.models.Rank;
import spark.Request;
import spark.Response;
import spark.Route;

View File

@ -1,7 +1,6 @@
package net.frozenorb.apiv3.routes.ranks;
import net.frozenorb.apiv3.models.Rank;
import net.frozenorb.apiv3.models.ServerGroup;
import net.frozenorb.apiv3.utils.ErrorUtils;
import spark.Request;
import spark.Response;

View File

@ -1,7 +1,6 @@
package net.frozenorb.apiv3.routes.ranks;
import net.frozenorb.apiv3.models.Rank;
import net.frozenorb.apiv3.models.ServerGroup;
import spark.Request;
import spark.Response;
import spark.Route;

View File

@ -1,7 +1,6 @@
package net.frozenorb.apiv3.routes.ranks;
import net.frozenorb.apiv3.APIv3;
import net.frozenorb.apiv3.models.NotificationTemplate;
import net.frozenorb.apiv3.models.Rank;
import spark.Request;
import spark.Response;

View File

@ -1,6 +1,5 @@
package net.frozenorb.apiv3.routes.serverGroups;
import net.frozenorb.apiv3.models.Server;
import net.frozenorb.apiv3.models.ServerGroup;
import net.frozenorb.apiv3.utils.ErrorUtils;
import spark.Request;

View File

@ -1,7 +1,6 @@
package net.frozenorb.apiv3.routes.serverGroups;
import net.frozenorb.apiv3.APIv3;
import net.frozenorb.apiv3.models.Rank;
import net.frozenorb.apiv3.models.ServerGroup;
import spark.Request;
import spark.Response;