diff --git a/src/main/java/net/frozenorb/apiv3/APIv3.java b/src/main/java/net/frozenorb/apiv3/APIv3.java index 30cfc12..a9f83dc 100644 --- a/src/main/java/net/frozenorb/apiv3/APIv3.java +++ b/src/main/java/net/frozenorb/apiv3/APIv3.java @@ -25,7 +25,6 @@ import io.vertx.core.http.HttpHeaders; import io.vertx.core.http.HttpMethod; import io.vertx.core.http.HttpServer; import io.vertx.core.http.HttpServerOptions; -import io.vertx.core.net.JksOptions; import io.vertx.ext.web.Router; import io.vertx.ext.web.RoutingContext; import io.vertx.ext.web.handler.BodyHandler; @@ -36,23 +35,23 @@ import lombok.Getter; import lombok.extern.slf4j.Slf4j; import net.frozenorb.apiv3.handler.ActorAttributeHandler; import net.frozenorb.apiv3.handler.AuthorizationHandler; -import net.frozenorb.apiv3.route.GETDumps; +import net.frozenorb.apiv3.route.GETDumpsType; import net.frozenorb.apiv3.route.GETWhoAmI; import net.frozenorb.apiv3.route.auditLog.GETAuditLog; import net.frozenorb.apiv3.route.auditLog.POSTAuditLog; import net.frozenorb.apiv3.route.chatFilterList.GETChatFilter; -import net.frozenorb.apiv3.route.emailToken.GETEmailTokensOwner; -import net.frozenorb.apiv3.route.emailToken.POSTEmailTokensConfirm; +import net.frozenorb.apiv3.route.emailToken.GETEmailTokensIdOwner; +import net.frozenorb.apiv3.route.emailToken.POSTEmailTokensIdConfirm; import net.frozenorb.apiv3.route.grants.DELETEGrantsId; import net.frozenorb.apiv3.route.grants.GETGrants; import net.frozenorb.apiv3.route.grants.GETGrantsId; import net.frozenorb.apiv3.route.grants.POSTGrants; -import net.frozenorb.apiv3.route.ipBans.DELETEIpBan; -import net.frozenorb.apiv3.route.ipBans.GETIpBan; +import net.frozenorb.apiv3.route.ipBans.DELETEIpBansId; +import net.frozenorb.apiv3.route.ipBans.GETIpBansId; import net.frozenorb.apiv3.route.ipBans.GETIpBans; import net.frozenorb.apiv3.route.ipBans.POSTIpBans; -import net.frozenorb.apiv3.route.ipIntel.GETIpIntel; -import net.frozenorb.apiv3.route.ipLog.GETIpLog; +import net.frozenorb.apiv3.route.ipIntel.GETIpInteld; +import net.frozenorb.apiv3.route.ipLog.GETIpLogId; import net.frozenorb.apiv3.route.notificationTemplates.DELETENotificationTemplatesId; import net.frozenorb.apiv3.route.notificationTemplates.GETNotificationTemplates; import net.frozenorb.apiv3.route.notificationTemplates.GETNotificationTemplatesId; @@ -86,7 +85,6 @@ import java.io.IOException; import java.io.InputStream; import java.time.Instant; import java.util.List; -import java.util.Map; import java.util.Properties; import java.util.UUID; import java.util.concurrent.TimeUnit; @@ -233,77 +231,76 @@ public final class APIv3 extends AbstractVerticle { http.route().handler(new AuthorizationHandler()); // TODO: The commented out routes - // TODO: RENAME THESE ROUTES TO BE RIGHT http.get("/auditLog").handler(new GETAuditLog()); http.post("/auditLog").handler(new POSTAuditLog()); http.get("/chatFilter").handler(new GETChatFilter()); - http.get("/emailTokens/:emailToken/owner").blockingHandler(new GETEmailTokensOwner(), false); - http.post("/emailTokens/:emailToken/confirm").blockingHandler(new POSTEmailTokensConfirm(), false); + http.get("/emailTokens/:id/owner").blockingHandler(new GETEmailTokensIdOwner(), false); + http.post("/emailTokens/:id/confirm").blockingHandler(new POSTEmailTokensIdConfirm(), false); http.get("/grants/:id").handler(new GETGrantsId()); http.get("/grants").handler(new GETGrants()); http.post("/grants").blockingHandler(new POSTGrants(), false); http.delete("/grants/:id").blockingHandler(new DELETEGrantsId(), false); - http.get("/ipBans/:id").handler(new GETIpBan()); + http.get("/ipBans/:id").handler(new GETIpBansId()); http.get("/ipBans").handler(new GETIpBans()); http.post("/ipBans").blockingHandler(new POSTIpBans(), false); - http.delete("/ipBans/:id").blockingHandler(new DELETEIpBan(), false); + http.delete("/ipBans/:id").blockingHandler(new DELETEIpBansId(), false); - http.get("/ipIntel/:id").handler(new GETIpIntel()); + http.get("/ipIntel/:id").handler(new GETIpInteld()); - http.get("/ipLog/:id").handler(new GETIpLog()); + http.get("/ipLog/:id").handler(new GETIpLogId()); http.get("/notificationTemplates/:id").handler(new GETNotificationTemplatesId()); http.get("/notificationTemplates").handler(new GETNotificationTemplates()); http.post("/notificationTemplates").blockingHandler(new POSTNotificationTemplates(), false); - //http.put("/notificationTemplates/:id").blockingHandler(new PUTNotificationTemplates(), false); + //http.put("/notificationTemplates/:id").blockingHandler(new PUTNotificationTemplatesId(), false); http.delete("/notificationTemplates/:id").blockingHandler(new DELETENotificationTemplatesId(), false); http.get("/punishments/:id").handler(new GETPunishmentsId()); http.get("/punishments").handler(new GETPunishments()); http.post("/punishments").blockingHandler(new POSTPunishments(), false); - http.delete("/punishments/:id").blockingHandler(new DELETEPunishments(), false); - http.delete("/users/:id/activePunishment").blockingHandler(new DELETEUserActivePunishment(), false); + http.delete("/punishments/:id").blockingHandler(new DELETEPunishmentsId(), false); + http.delete("/users/:id/activePunishment").blockingHandler(new DELETEUsersIdActivePunishment(), false); http.get("/ranks/:id").handler(new GETRanksId()); http.get("/ranks").handler(new GETRanks()); http.post("/ranks").blockingHandler(new POSTRanks(), false); - //http.put("/ranks/:id").blockingHandler(new PUTRank(), false); + //http.put("/ranks/:id").blockingHandler(new PUTRanksId(), false); http.delete("/ranks/:id").blockingHandler(new DELETERanksId(), false); http.get("/serverGroups/:id").handler(new GETServerGroupsId()); http.get("/serverGroups").handler(new GETServerGroups()); http.post("/serverGroups").blockingHandler(new POSTServerGroups(), false); - //http.put("/serverGroups/:id").blockingHandler(new PUTServerGroup(), false); + //http.put("/serverGroups/:id").blockingHandler(new PUTServerGroupsId(), false); http.delete("/serverGroups/:id").blockingHandler(new DELETEServerGroupsId(), false); http.get("/servers/:id").handler(new GETServersId()); http.get("/servers").handler(new GETServers()); http.post("/servers/heartbeat").handler(new POSTServersHeartbeat()); http.post("/servers").blockingHandler(new POSTServers(), false); - //http.put("/servers/:id").blockingHandler(new PUTServer(), false); + //http.put("/servers/:id").blockingHandler(new PUTServersId(), false); http.delete("/servers/:id").blockingHandler(new DELETEServersId(), false); http.get("/staff").blockingHandler(new GETStaff(), false); - http.get("/users/:id").handler(new GETUser()); - http.get("/users/:id/details").blockingHandler(new GETUserDetails(), false); - http.get("/users/:id/permissions").handler(new GETUserPermissions()); - http.get("/users/:id/requiresTotp").handler(new GETUserRequiresTotp()); - http.get("/users/:id/verifyPassword").blockingHandler(new GETUserVerifyPassword(), false); - http.post("/users/:id/changePassword").blockingHandler(new POSTUserChangePassword(), false); - http.post("/users/:id/leave").handler(new POSTUserLeave()); - http.post("/users/:id/login").blockingHandler(new POSTUserLogin()); - http.post("/users/:id/notify").blockingHandler(new POSTUserNotify(), false); - http.post("/users/:id/passwordReset").blockingHandler(new POSTUserPasswordReset(), false); - http.post("/users/:id/register").blockingHandler(new POSTUserRegister(), false); - http.post("/users/:id/setupTotp").blockingHandler(new POSTUserSetupTotp(), false); - http.post("/users/:id/verifyTotp").blockingHandler(new POSTUserVerifyTotp(), false); + http.get("/users/:id").handler(new GETUsersId()); + http.get("/users/:id/details").blockingHandler(new GETUsersIdDetails(), false); + http.get("/users/:id/permissions").handler(new GETUsersIdPermissions()); + http.get("/users/:id/requiresTotp").handler(new GETUsersIdRequiresTotp()); + http.get("/users/:id/verifyPassword").blockingHandler(new GETUsersIdVerifyPassword(), false); + http.post("/users/:id/changePassword").blockingHandler(new POSTUsersIdChangePassword(), false); + http.post("/users/:id/leave").handler(new POSTUsersIdLeave()); + http.post("/users/:id/login").blockingHandler(new POSTUsersIdLogin()); + http.post("/users/:id/notify").blockingHandler(new POSTUsersIdNotify(), false); + http.post("/users/:id/passwordReset").blockingHandler(new POSTUsersIdPasswordReset(), false); + http.post("/users/:id/register").blockingHandler(new POSTUsersIdRegister(), false); + http.post("/users/:id/setupTotp").blockingHandler(new POSTUsersIdSetupTotp(), false); + http.post("/users/:id/verifyTotp").blockingHandler(new POSTUsersIdVerifyTotp(), false); - http.get("/dumps/:type").handler(new GETDumps()); + http.get("/dumps/:type").handler(new GETDumpsType()); http.get("/whoami").handler(new GETWhoAmI()); int port = Integer.parseInt(config.getProperty("http.port")); diff --git a/src/main/java/net/frozenorb/apiv3/route/GETDumps.java b/src/main/java/net/frozenorb/apiv3/route/GETDumpsType.java similarity index 92% rename from src/main/java/net/frozenorb/apiv3/route/GETDumps.java rename to src/main/java/net/frozenorb/apiv3/route/GETDumpsType.java index 4495395..6602ebd 100644 --- a/src/main/java/net/frozenorb/apiv3/route/GETDumps.java +++ b/src/main/java/net/frozenorb/apiv3/route/GETDumpsType.java @@ -11,13 +11,13 @@ import net.frozenorb.apiv3.util.ErrorUtils; import java.util.*; import java.util.concurrent.TimeUnit; -public final class GETDumps implements Handler { +public final class GETDumpsType implements Handler { private List banCache = new LinkedList<>(); private List blacklistCache = new LinkedList<>(); private Map> grantCache = new HashMap<>(); - public GETDumps() { + public GETDumpsType() { APIv3.getVertxInstance().setPeriodic(TimeUnit.MINUTES.toMillis(5), (id) -> { Punishment.findByType(ImmutableSet.of( Punishment.PunishmentType.BAN, @@ -43,8 +43,8 @@ public final class GETDumps implements Handler { } } - GETDumps.this.banCache = banCache; - GETDumps.this.blacklistCache = blacklistCache; + GETDumpsType.this.banCache = banCache; + GETDumpsType.this.blacklistCache = blacklistCache; }); Grant.findAll((grants, error) -> { @@ -70,7 +70,7 @@ public final class GETDumps implements Handler { users.add(grant.getUser()); } - GETDumps.this.grantCache = grantCache; + GETDumpsType.this.grantCache = grantCache; }); }); } diff --git a/src/main/java/net/frozenorb/apiv3/route/emailToken/GETEmailTokensOwner.java b/src/main/java/net/frozenorb/apiv3/route/emailToken/GETEmailTokensIdOwner.java similarity index 87% rename from src/main/java/net/frozenorb/apiv3/route/emailToken/GETEmailTokensOwner.java rename to src/main/java/net/frozenorb/apiv3/route/emailToken/GETEmailTokensIdOwner.java index e234e53..c5a98ab 100644 --- a/src/main/java/net/frozenorb/apiv3/route/emailToken/GETEmailTokensOwner.java +++ b/src/main/java/net/frozenorb/apiv3/route/emailToken/GETEmailTokensIdOwner.java @@ -6,7 +6,7 @@ import net.frozenorb.apiv3.APIv3; import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.util.ErrorUtils; -public final class GETEmailTokensOwner implements Handler { +public final class GETEmailTokensIdOwner implements Handler { public void handle(RoutingContext ctx) { User.findByEmailToken(ctx.request().getParam("id"), (user, error) -> { diff --git a/src/main/java/net/frozenorb/apiv3/route/emailToken/POSTEmailTokensConfirm.java b/src/main/java/net/frozenorb/apiv3/route/emailToken/POSTEmailTokensIdConfirm.java similarity index 88% rename from src/main/java/net/frozenorb/apiv3/route/emailToken/POSTEmailTokensConfirm.java rename to src/main/java/net/frozenorb/apiv3/route/emailToken/POSTEmailTokensIdConfirm.java index 41b83b6..e33d4a5 100644 --- a/src/main/java/net/frozenorb/apiv3/route/emailToken/POSTEmailTokensConfirm.java +++ b/src/main/java/net/frozenorb/apiv3/route/emailToken/POSTEmailTokensIdConfirm.java @@ -12,15 +12,15 @@ import net.frozenorb.apiv3.util.ErrorUtils; import java.util.concurrent.TimeUnit; -public final class POSTEmailTokensConfirm implements Handler { +public final class POSTEmailTokensIdConfirm implements Handler { public void handle(RoutingContext ctx) { BlockingCallback userCallback = new BlockingCallback<>(); - User.findByEmailToken(ctx.request().getParam("emailToken"), userCallback); + User.findByEmailToken(ctx.request().getParam("id"), userCallback); User user = userCallback.get(); if (user == null) { - ErrorUtils.respondNotFound(ctx, "Email token", ctx.request().getParam("emailToken")); + ErrorUtils.respondNotFound(ctx, "Email token", ctx.request().getParam("id")); return; } @@ -45,7 +45,7 @@ public final class POSTEmailTokensConfirm implements Handler { } user.completeRegistration(user.getPendingEmail()); - user.updateUsername(password); + user.updatePassword(password); BlockingCallback callback = new BlockingCallback<>(); user.save(callback); callback.get(); diff --git a/src/main/java/net/frozenorb/apiv3/route/ipBans/DELETEIpBan.java b/src/main/java/net/frozenorb/apiv3/route/ipBans/DELETEIpBansId.java similarity index 96% rename from src/main/java/net/frozenorb/apiv3/route/ipBans/DELETEIpBan.java rename to src/main/java/net/frozenorb/apiv3/route/ipBans/DELETEIpBansId.java index 9a0026e..d02462f 100644 --- a/src/main/java/net/frozenorb/apiv3/route/ipBans/DELETEIpBan.java +++ b/src/main/java/net/frozenorb/apiv3/route/ipBans/DELETEIpBansId.java @@ -14,7 +14,7 @@ import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.unsorted.BlockingCallback; import net.frozenorb.apiv3.util.ErrorUtils; -public final class DELETEIpBan implements Handler { +public final class DELETEIpBansId implements Handler { public void handle(RoutingContext ctx) { BlockingCallback ipBanCallback = new BlockingCallback<>(); diff --git a/src/main/java/net/frozenorb/apiv3/route/ipBans/GETIpBan.java b/src/main/java/net/frozenorb/apiv3/route/ipBans/GETIpBansId.java similarity index 88% rename from src/main/java/net/frozenorb/apiv3/route/ipBans/GETIpBan.java rename to src/main/java/net/frozenorb/apiv3/route/ipBans/GETIpBansId.java index 873bfac..341a698 100644 --- a/src/main/java/net/frozenorb/apiv3/route/ipBans/GETIpBan.java +++ b/src/main/java/net/frozenorb/apiv3/route/ipBans/GETIpBansId.java @@ -6,7 +6,7 @@ import net.frozenorb.apiv3.APIv3; import net.frozenorb.apiv3.model.IpBan; import net.frozenorb.apiv3.util.ErrorUtils; -public final class GETIpBan implements Handler { +public final class GETIpBansId implements Handler { public void handle(RoutingContext ctx) { IpBan.findById(ctx.request().getParam("id"), (ipBan, error) -> { diff --git a/src/main/java/net/frozenorb/apiv3/route/ipIntel/GETIpIntel.java b/src/main/java/net/frozenorb/apiv3/route/ipIntel/GETIpInteld.java similarity index 92% rename from src/main/java/net/frozenorb/apiv3/route/ipIntel/GETIpIntel.java rename to src/main/java/net/frozenorb/apiv3/route/ipIntel/GETIpInteld.java index 2678e7f..570465a 100644 --- a/src/main/java/net/frozenorb/apiv3/route/ipIntel/GETIpIntel.java +++ b/src/main/java/net/frozenorb/apiv3/route/ipIntel/GETIpInteld.java @@ -7,7 +7,7 @@ import net.frozenorb.apiv3.model.IpIntel; import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.IpUtils; -public final class GETIpIntel implements Handler { +public final class GETIpInteld implements Handler { public void handle(RoutingContext ctx) { String userIp = ctx.request().getParam("id"); diff --git a/src/main/java/net/frozenorb/apiv3/route/ipLog/GETIpLog.java b/src/main/java/net/frozenorb/apiv3/route/ipLog/GETIpLogId.java similarity index 93% rename from src/main/java/net/frozenorb/apiv3/route/ipLog/GETIpLog.java rename to src/main/java/net/frozenorb/apiv3/route/ipLog/GETIpLogId.java index 1f6cb56..8291254 100644 --- a/src/main/java/net/frozenorb/apiv3/route/ipLog/GETIpLog.java +++ b/src/main/java/net/frozenorb/apiv3/route/ipLog/GETIpLogId.java @@ -7,7 +7,7 @@ import net.frozenorb.apiv3.model.IpLogEntry; import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.util.ErrorUtils; -public final class GETIpLog implements Handler { +public final class GETIpLogId implements Handler { public void handle(RoutingContext ctx) { User.findById(ctx.request().getParam("id"), (user, error) -> { diff --git a/src/main/java/net/frozenorb/apiv3/route/punishments/DELETEPunishments.java b/src/main/java/net/frozenorb/apiv3/route/punishments/DELETEPunishmentsId.java similarity index 96% rename from src/main/java/net/frozenorb/apiv3/route/punishments/DELETEPunishments.java rename to src/main/java/net/frozenorb/apiv3/route/punishments/DELETEPunishmentsId.java index a725012..f9b64b2 100644 --- a/src/main/java/net/frozenorb/apiv3/route/punishments/DELETEPunishments.java +++ b/src/main/java/net/frozenorb/apiv3/route/punishments/DELETEPunishmentsId.java @@ -14,7 +14,7 @@ import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.unsorted.BlockingCallback; import net.frozenorb.apiv3.util.ErrorUtils; -public final class DELETEPunishments implements Handler { +public final class DELETEPunishmentsId implements Handler { public void handle(RoutingContext ctx) { BlockingCallback punishmentCallback = new BlockingCallback<>(); diff --git a/src/main/java/net/frozenorb/apiv3/route/punishments/DELETEUserActivePunishment.java b/src/main/java/net/frozenorb/apiv3/route/punishments/DELETEUsersIdActivePunishment.java similarity index 96% rename from src/main/java/net/frozenorb/apiv3/route/punishments/DELETEUserActivePunishment.java rename to src/main/java/net/frozenorb/apiv3/route/punishments/DELETEUsersIdActivePunishment.java index b061543..aac25d5 100644 --- a/src/main/java/net/frozenorb/apiv3/route/punishments/DELETEUserActivePunishment.java +++ b/src/main/java/net/frozenorb/apiv3/route/punishments/DELETEUsersIdActivePunishment.java @@ -17,7 +17,7 @@ import net.frozenorb.apiv3.util.ErrorUtils; import java.util.List; -public final class DELETEUserActivePunishment implements Handler { +public final class DELETEUsersIdActivePunishment implements Handler { public void handle(RoutingContext ctx) { BlockingCallback userCallback = new BlockingCallback<>(); diff --git a/src/main/java/net/frozenorb/apiv3/route/users/GETUser.java b/src/main/java/net/frozenorb/apiv3/route/users/GETUsersId.java similarity index 89% rename from src/main/java/net/frozenorb/apiv3/route/users/GETUser.java rename to src/main/java/net/frozenorb/apiv3/route/users/GETUsersId.java index bbcee15..4ed1f8d 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/GETUser.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/GETUsersId.java @@ -6,7 +6,7 @@ import net.frozenorb.apiv3.APIv3; import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.util.ErrorUtils; -public final class GETUser implements Handler { +public final class GETUsersId implements Handler { public void handle(RoutingContext ctx) { User.findById(ctx.request().getParam("id"), (user, error) -> { diff --git a/src/main/java/net/frozenorb/apiv3/route/users/GETUserDetails.java b/src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdDetails.java similarity index 95% rename from src/main/java/net/frozenorb/apiv3/route/users/GETUserDetails.java rename to src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdDetails.java index 340d781..3164762 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/GETUserDetails.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdDetails.java @@ -14,7 +14,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -public final class GETUserDetails implements Handler { +public final class GETUsersIdDetails implements Handler { public void handle(RoutingContext ctx) { BlockingCallback userCallback = new BlockingCallback<>(); diff --git a/src/main/java/net/frozenorb/apiv3/route/users/GETUserPermissions.java b/src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdPermissions.java similarity index 92% rename from src/main/java/net/frozenorb/apiv3/route/users/GETUserPermissions.java rename to src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdPermissions.java index 4147c87..143ded5 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/GETUserPermissions.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdPermissions.java @@ -6,7 +6,7 @@ import net.frozenorb.apiv3.APIv3; import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.util.ErrorUtils; -public final class GETUserPermissions implements Handler { +public final class GETUsersIdPermissions implements Handler { public void handle(RoutingContext ctx) { User.findById(ctx.request().getParam("id"), (user, error) -> { diff --git a/src/main/java/net/frozenorb/apiv3/route/users/GETUserRequiresTOTP.java b/src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdRequiresTotp.java similarity index 95% rename from src/main/java/net/frozenorb/apiv3/route/users/GETUserRequiresTOTP.java rename to src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdRequiresTotp.java index c5637cd..98bee7d 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/GETUserRequiresTOTP.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdRequiresTotp.java @@ -9,7 +9,7 @@ import net.frozenorb.apiv3.unsorted.RequiresTotpResult; import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.IpUtils; -public final class GETUserRequiresTotp implements Handler { +public final class GETUsersIdRequiresTotp implements Handler { public void handle(RoutingContext ctx) { User.findById(ctx.request().getParam("id"), (user, error) -> { diff --git a/src/main/java/net/frozenorb/apiv3/route/users/GETUserVerifyPassword.java b/src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdVerifyPassword.java similarity index 94% rename from src/main/java/net/frozenorb/apiv3/route/users/GETUserVerifyPassword.java rename to src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdVerifyPassword.java index 0c91b1b..feda602 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/GETUserVerifyPassword.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdVerifyPassword.java @@ -8,7 +8,7 @@ import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.unsorted.BlockingCallback; import net.frozenorb.apiv3.util.ErrorUtils; -public final class GETUserVerifyPassword implements Handler { +public final class GETUsersIdVerifyPassword implements Handler { public void handle(RoutingContext ctx) { BlockingCallback callback = new BlockingCallback<>(); diff --git a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserChangePassword.java b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdChangePassword.java similarity index 97% rename from src/main/java/net/frozenorb/apiv3/route/users/POSTUserChangePassword.java rename to src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdChangePassword.java index 8057cfe..93a6f66 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserChangePassword.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdChangePassword.java @@ -13,7 +13,7 @@ import net.frozenorb.apiv3.util.ErrorUtils; import java.util.concurrent.TimeUnit; -public final class POSTUserChangePassword implements Handler { +public final class POSTUsersIdChangePassword implements Handler { public void handle(RoutingContext ctx) { BlockingCallback userCallback = new BlockingCallback<>(); diff --git a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserLeave.java b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdLeave.java similarity index 93% rename from src/main/java/net/frozenorb/apiv3/route/users/POSTUserLeave.java rename to src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdLeave.java index dcb19dd..0127bba 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserLeave.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdLeave.java @@ -6,7 +6,7 @@ import net.frozenorb.apiv3.APIv3; import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.util.ErrorUtils; -public class POSTUserLeave implements Handler { +public class POSTUsersIdLeave implements Handler { @Override public void handle(RoutingContext ctx) { diff --git a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserLogin.java b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdLogin.java similarity index 97% rename from src/main/java/net/frozenorb/apiv3/route/users/POSTUserLogin.java rename to src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdLogin.java index e1525e7..09ca685 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserLogin.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdLogin.java @@ -17,7 +17,7 @@ import net.frozenorb.apiv3.util.UuidUtils; import java.util.UUID; -public final class POSTUserLogin implements Handler { +public final class POSTUsersIdLogin implements Handler { public void handle(RoutingContext ctx) { UUID uuid = UUID.fromString(ctx.request().getParam("id")); diff --git a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserNotify.java b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdNotify.java similarity index 96% rename from src/main/java/net/frozenorb/apiv3/route/users/POSTUserNotify.java rename to src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdNotify.java index 030f94c..4114aa8 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserNotify.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdNotify.java @@ -13,7 +13,7 @@ import net.frozenorb.apiv3.util.ErrorUtils; import java.util.Map; -public final class POSTUserNotify implements Handler { +public final class POSTUsersIdNotify implements Handler { public void handle(RoutingContext ctx) { BlockingCallback userCallback = new BlockingCallback<>(); diff --git a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserPasswordReset.java b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdPasswordReset.java similarity index 96% rename from src/main/java/net/frozenorb/apiv3/route/users/POSTUserPasswordReset.java rename to src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdPasswordReset.java index 01094d0..084a4f3 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserPasswordReset.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdPasswordReset.java @@ -15,7 +15,7 @@ import net.frozenorb.apiv3.util.ErrorUtils; import java.util.Map; import java.util.concurrent.TimeUnit; -public final class POSTUserPasswordReset implements Handler { +public final class POSTUsersIdPasswordReset implements Handler { public void handle(RoutingContext ctx) { BlockingCallback userCallback = new BlockingCallback<>(); diff --git a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserRegister.java b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdRegister.java similarity index 97% rename from src/main/java/net/frozenorb/apiv3/route/users/POSTUserRegister.java rename to src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdRegister.java index f86b64d..ff52412 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserRegister.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdRegister.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.regex.Pattern; -public final class POSTUserRegister implements Handler { +public final class POSTUsersIdRegister implements Handler { private static final Pattern VALID_EMAIL_PATTERN = Pattern.compile( "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", diff --git a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserSetupTOTP.java b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdSetupTotp.java similarity index 95% rename from src/main/java/net/frozenorb/apiv3/route/users/POSTUserSetupTOTP.java rename to src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdSetupTotp.java index 3078e28..225d711 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserSetupTOTP.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdSetupTotp.java @@ -12,7 +12,7 @@ import net.frozenorb.apiv3.unsorted.BlockingCallback; import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.TotpUtils; -public final class POSTUserSetupTotp implements Handler { +public final class POSTUsersIdSetupTotp implements Handler { public void handle(RoutingContext ctx) { BlockingCallback userCallback = new BlockingCallback<>(); diff --git a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserVerifyTOTP.java b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdVerifyTotp.java similarity index 97% rename from src/main/java/net/frozenorb/apiv3/route/users/POSTUserVerifyTOTP.java rename to src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdVerifyTotp.java index 5b6af4b..e87dc66 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/POSTUserVerifyTOTP.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdVerifyTotp.java @@ -13,7 +13,7 @@ import net.frozenorb.apiv3.util.TotpUtils; import java.util.concurrent.TimeUnit; -public final class POSTUserVerifyTotp implements Handler { +public final class POSTUsersIdVerifyTotp implements Handler { public void handle(RoutingContext ctx) { BlockingCallback userCallback = new BlockingCallback<>();