Rename route classes to match their actual paths

This commit is contained in:
Colin McDonald 2016-06-24 19:38:00 -04:00
parent fd1ec2b475
commit 0653edaae3
23 changed files with 62 additions and 65 deletions

View File

@ -25,7 +25,6 @@ import io.vertx.core.http.HttpHeaders;
import io.vertx.core.http.HttpMethod; import io.vertx.core.http.HttpMethod;
import io.vertx.core.http.HttpServer; import io.vertx.core.http.HttpServer;
import io.vertx.core.http.HttpServerOptions; import io.vertx.core.http.HttpServerOptions;
import io.vertx.core.net.JksOptions;
import io.vertx.ext.web.Router; import io.vertx.ext.web.Router;
import io.vertx.ext.web.RoutingContext; import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.handler.BodyHandler; import io.vertx.ext.web.handler.BodyHandler;
@ -36,23 +35,23 @@ import lombok.Getter;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.frozenorb.apiv3.handler.ActorAttributeHandler; import net.frozenorb.apiv3.handler.ActorAttributeHandler;
import net.frozenorb.apiv3.handler.AuthorizationHandler; 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.GETWhoAmI;
import net.frozenorb.apiv3.route.auditLog.GETAuditLog; import net.frozenorb.apiv3.route.auditLog.GETAuditLog;
import net.frozenorb.apiv3.route.auditLog.POSTAuditLog; import net.frozenorb.apiv3.route.auditLog.POSTAuditLog;
import net.frozenorb.apiv3.route.chatFilterList.GETChatFilter; import net.frozenorb.apiv3.route.chatFilterList.GETChatFilter;
import net.frozenorb.apiv3.route.emailToken.GETEmailTokensOwner; import net.frozenorb.apiv3.route.emailToken.GETEmailTokensIdOwner;
import net.frozenorb.apiv3.route.emailToken.POSTEmailTokensConfirm; import net.frozenorb.apiv3.route.emailToken.POSTEmailTokensIdConfirm;
import net.frozenorb.apiv3.route.grants.DELETEGrantsId; import net.frozenorb.apiv3.route.grants.DELETEGrantsId;
import net.frozenorb.apiv3.route.grants.GETGrants; import net.frozenorb.apiv3.route.grants.GETGrants;
import net.frozenorb.apiv3.route.grants.GETGrantsId; import net.frozenorb.apiv3.route.grants.GETGrantsId;
import net.frozenorb.apiv3.route.grants.POSTGrants; import net.frozenorb.apiv3.route.grants.POSTGrants;
import net.frozenorb.apiv3.route.ipBans.DELETEIpBan; import net.frozenorb.apiv3.route.ipBans.DELETEIpBansId;
import net.frozenorb.apiv3.route.ipBans.GETIpBan; import net.frozenorb.apiv3.route.ipBans.GETIpBansId;
import net.frozenorb.apiv3.route.ipBans.GETIpBans; import net.frozenorb.apiv3.route.ipBans.GETIpBans;
import net.frozenorb.apiv3.route.ipBans.POSTIpBans; import net.frozenorb.apiv3.route.ipBans.POSTIpBans;
import net.frozenorb.apiv3.route.ipIntel.GETIpIntel; import net.frozenorb.apiv3.route.ipIntel.GETIpInteld;
import net.frozenorb.apiv3.route.ipLog.GETIpLog; import net.frozenorb.apiv3.route.ipLog.GETIpLogId;
import net.frozenorb.apiv3.route.notificationTemplates.DELETENotificationTemplatesId; import net.frozenorb.apiv3.route.notificationTemplates.DELETENotificationTemplatesId;
import net.frozenorb.apiv3.route.notificationTemplates.GETNotificationTemplates; import net.frozenorb.apiv3.route.notificationTemplates.GETNotificationTemplates;
import net.frozenorb.apiv3.route.notificationTemplates.GETNotificationTemplatesId; import net.frozenorb.apiv3.route.notificationTemplates.GETNotificationTemplatesId;
@ -86,7 +85,6 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.time.Instant; import java.time.Instant;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Properties; import java.util.Properties;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@ -233,77 +231,76 @@ public final class APIv3 extends AbstractVerticle {
http.route().handler(new AuthorizationHandler()); http.route().handler(new AuthorizationHandler());
// TODO: The commented out routes // TODO: The commented out routes
// TODO: RENAME THESE ROUTES TO BE RIGHT
http.get("/auditLog").handler(new GETAuditLog()); http.get("/auditLog").handler(new GETAuditLog());
http.post("/auditLog").handler(new POSTAuditLog()); http.post("/auditLog").handler(new POSTAuditLog());
http.get("/chatFilter").handler(new GETChatFilter()); http.get("/chatFilter").handler(new GETChatFilter());
http.get("/emailTokens/:emailToken/owner").blockingHandler(new GETEmailTokensOwner(), false); http.get("/emailTokens/:id/owner").blockingHandler(new GETEmailTokensIdOwner(), false);
http.post("/emailTokens/:emailToken/confirm").blockingHandler(new POSTEmailTokensConfirm(), false); http.post("/emailTokens/:id/confirm").blockingHandler(new POSTEmailTokensIdConfirm(), false);
http.get("/grants/:id").handler(new GETGrantsId()); http.get("/grants/:id").handler(new GETGrantsId());
http.get("/grants").handler(new GETGrants()); http.get("/grants").handler(new GETGrants());
http.post("/grants").blockingHandler(new POSTGrants(), false); http.post("/grants").blockingHandler(new POSTGrants(), false);
http.delete("/grants/:id").blockingHandler(new DELETEGrantsId(), 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.get("/ipBans").handler(new GETIpBans());
http.post("/ipBans").blockingHandler(new POSTIpBans(), false); 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/:id").handler(new GETNotificationTemplatesId());
http.get("/notificationTemplates").handler(new GETNotificationTemplates()); http.get("/notificationTemplates").handler(new GETNotificationTemplates());
http.post("/notificationTemplates").blockingHandler(new POSTNotificationTemplates(), false); 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.delete("/notificationTemplates/:id").blockingHandler(new DELETENotificationTemplatesId(), false);
http.get("/punishments/:id").handler(new GETPunishmentsId()); http.get("/punishments/:id").handler(new GETPunishmentsId());
http.get("/punishments").handler(new GETPunishments()); http.get("/punishments").handler(new GETPunishments());
http.post("/punishments").blockingHandler(new POSTPunishments(), false); http.post("/punishments").blockingHandler(new POSTPunishments(), false);
http.delete("/punishments/:id").blockingHandler(new DELETEPunishments(), false); http.delete("/punishments/:id").blockingHandler(new DELETEPunishmentsId(), false);
http.delete("/users/:id/activePunishment").blockingHandler(new DELETEUserActivePunishment(), false); http.delete("/users/:id/activePunishment").blockingHandler(new DELETEUsersIdActivePunishment(), false);
http.get("/ranks/:id").handler(new GETRanksId()); http.get("/ranks/:id").handler(new GETRanksId());
http.get("/ranks").handler(new GETRanks()); http.get("/ranks").handler(new GETRanks());
http.post("/ranks").blockingHandler(new POSTRanks(), false); 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.delete("/ranks/:id").blockingHandler(new DELETERanksId(), false);
http.get("/serverGroups/:id").handler(new GETServerGroupsId()); http.get("/serverGroups/:id").handler(new GETServerGroupsId());
http.get("/serverGroups").handler(new GETServerGroups()); http.get("/serverGroups").handler(new GETServerGroups());
http.post("/serverGroups").blockingHandler(new POSTServerGroups(), false); 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.delete("/serverGroups/:id").blockingHandler(new DELETEServerGroupsId(), false);
http.get("/servers/:id").handler(new GETServersId()); http.get("/servers/:id").handler(new GETServersId());
http.get("/servers").handler(new GETServers()); http.get("/servers").handler(new GETServers());
http.post("/servers/heartbeat").handler(new POSTServersHeartbeat()); http.post("/servers/heartbeat").handler(new POSTServersHeartbeat());
http.post("/servers").blockingHandler(new POSTServers(), false); 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.delete("/servers/:id").blockingHandler(new DELETEServersId(), false);
http.get("/staff").blockingHandler(new GETStaff(), false); http.get("/staff").blockingHandler(new GETStaff(), false);
http.get("/users/:id").handler(new GETUser()); http.get("/users/:id").handler(new GETUsersId());
http.get("/users/:id/details").blockingHandler(new GETUserDetails(), false); http.get("/users/:id/details").blockingHandler(new GETUsersIdDetails(), false);
http.get("/users/:id/permissions").handler(new GETUserPermissions()); http.get("/users/:id/permissions").handler(new GETUsersIdPermissions());
http.get("/users/:id/requiresTotp").handler(new GETUserRequiresTotp()); http.get("/users/:id/requiresTotp").handler(new GETUsersIdRequiresTotp());
http.get("/users/:id/verifyPassword").blockingHandler(new GETUserVerifyPassword(), false); http.get("/users/:id/verifyPassword").blockingHandler(new GETUsersIdVerifyPassword(), false);
http.post("/users/:id/changePassword").blockingHandler(new POSTUserChangePassword(), false); http.post("/users/:id/changePassword").blockingHandler(new POSTUsersIdChangePassword(), false);
http.post("/users/:id/leave").handler(new POSTUserLeave()); http.post("/users/:id/leave").handler(new POSTUsersIdLeave());
http.post("/users/:id/login").blockingHandler(new POSTUserLogin()); http.post("/users/:id/login").blockingHandler(new POSTUsersIdLogin());
http.post("/users/:id/notify").blockingHandler(new POSTUserNotify(), false); http.post("/users/:id/notify").blockingHandler(new POSTUsersIdNotify(), false);
http.post("/users/:id/passwordReset").blockingHandler(new POSTUserPasswordReset(), false); http.post("/users/:id/passwordReset").blockingHandler(new POSTUsersIdPasswordReset(), false);
http.post("/users/:id/register").blockingHandler(new POSTUserRegister(), false); http.post("/users/:id/register").blockingHandler(new POSTUsersIdRegister(), false);
http.post("/users/:id/setupTotp").blockingHandler(new POSTUserSetupTotp(), false); http.post("/users/:id/setupTotp").blockingHandler(new POSTUsersIdSetupTotp(), false);
http.post("/users/:id/verifyTotp").blockingHandler(new POSTUserVerifyTotp(), 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()); http.get("/whoami").handler(new GETWhoAmI());
int port = Integer.parseInt(config.getProperty("http.port")); int port = Integer.parseInt(config.getProperty("http.port"));

View File

@ -11,13 +11,13 @@ import net.frozenorb.apiv3.util.ErrorUtils;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
public final class GETDumps implements Handler<RoutingContext> { public final class GETDumpsType implements Handler<RoutingContext> {
private List<UUID> banCache = new LinkedList<>(); private List<UUID> banCache = new LinkedList<>();
private List<UUID> blacklistCache = new LinkedList<>(); private List<UUID> blacklistCache = new LinkedList<>();
private Map<String, List<UUID>> grantCache = new HashMap<>(); private Map<String, List<UUID>> grantCache = new HashMap<>();
public GETDumps() { public GETDumpsType() {
APIv3.getVertxInstance().setPeriodic(TimeUnit.MINUTES.toMillis(5), (id) -> { APIv3.getVertxInstance().setPeriodic(TimeUnit.MINUTES.toMillis(5), (id) -> {
Punishment.findByType(ImmutableSet.of( Punishment.findByType(ImmutableSet.of(
Punishment.PunishmentType.BAN, Punishment.PunishmentType.BAN,
@ -43,8 +43,8 @@ public final class GETDumps implements Handler<RoutingContext> {
} }
} }
GETDumps.this.banCache = banCache; GETDumpsType.this.banCache = banCache;
GETDumps.this.blacklistCache = blacklistCache; GETDumpsType.this.blacklistCache = blacklistCache;
}); });
Grant.findAll((grants, error) -> { Grant.findAll((grants, error) -> {
@ -70,7 +70,7 @@ public final class GETDumps implements Handler<RoutingContext> {
users.add(grant.getUser()); users.add(grant.getUser());
} }
GETDumps.this.grantCache = grantCache; GETDumpsType.this.grantCache = grantCache;
}); });
}); });
} }

View File

@ -6,7 +6,7 @@ import net.frozenorb.apiv3.APIv3;
import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.model.User;
import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.ErrorUtils;
public final class GETEmailTokensOwner implements Handler<RoutingContext> { public final class GETEmailTokensIdOwner implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
User.findByEmailToken(ctx.request().getParam("id"), (user, error) -> { User.findByEmailToken(ctx.request().getParam("id"), (user, error) -> {

View File

@ -12,15 +12,15 @@ import net.frozenorb.apiv3.util.ErrorUtils;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
public final class POSTEmailTokensConfirm implements Handler<RoutingContext> { public final class POSTEmailTokensIdConfirm implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
BlockingCallback<User> userCallback = new BlockingCallback<>(); BlockingCallback<User> userCallback = new BlockingCallback<>();
User.findByEmailToken(ctx.request().getParam("emailToken"), userCallback); User.findByEmailToken(ctx.request().getParam("id"), userCallback);
User user = userCallback.get(); User user = userCallback.get();
if (user == null) { if (user == null) {
ErrorUtils.respondNotFound(ctx, "Email token", ctx.request().getParam("emailToken")); ErrorUtils.respondNotFound(ctx, "Email token", ctx.request().getParam("id"));
return; return;
} }
@ -45,7 +45,7 @@ public final class POSTEmailTokensConfirm implements Handler<RoutingContext> {
} }
user.completeRegistration(user.getPendingEmail()); user.completeRegistration(user.getPendingEmail());
user.updateUsername(password); user.updatePassword(password);
BlockingCallback<UpdateResult> callback = new BlockingCallback<>(); BlockingCallback<UpdateResult> callback = new BlockingCallback<>();
user.save(callback); user.save(callback);
callback.get(); callback.get();

View File

@ -14,7 +14,7 @@ import net.frozenorb.apiv3.model.User;
import net.frozenorb.apiv3.unsorted.BlockingCallback; import net.frozenorb.apiv3.unsorted.BlockingCallback;
import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.ErrorUtils;
public final class DELETEIpBan implements Handler<RoutingContext> { public final class DELETEIpBansId implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
BlockingCallback<IpBan> ipBanCallback = new BlockingCallback<>(); BlockingCallback<IpBan> ipBanCallback = new BlockingCallback<>();

View File

@ -6,7 +6,7 @@ import net.frozenorb.apiv3.APIv3;
import net.frozenorb.apiv3.model.IpBan; import net.frozenorb.apiv3.model.IpBan;
import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.ErrorUtils;
public final class GETIpBan implements Handler<RoutingContext> { public final class GETIpBansId implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
IpBan.findById(ctx.request().getParam("id"), (ipBan, error) -> { IpBan.findById(ctx.request().getParam("id"), (ipBan, error) -> {

View File

@ -7,7 +7,7 @@ import net.frozenorb.apiv3.model.IpIntel;
import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.ErrorUtils;
import net.frozenorb.apiv3.util.IpUtils; import net.frozenorb.apiv3.util.IpUtils;
public final class GETIpIntel implements Handler<RoutingContext> { public final class GETIpInteld implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
String userIp = ctx.request().getParam("id"); String userIp = ctx.request().getParam("id");

View File

@ -7,7 +7,7 @@ import net.frozenorb.apiv3.model.IpLogEntry;
import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.model.User;
import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.ErrorUtils;
public final class GETIpLog implements Handler<RoutingContext> { public final class GETIpLogId implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
User.findById(ctx.request().getParam("id"), (user, error) -> { User.findById(ctx.request().getParam("id"), (user, error) -> {

View File

@ -14,7 +14,7 @@ import net.frozenorb.apiv3.model.User;
import net.frozenorb.apiv3.unsorted.BlockingCallback; import net.frozenorb.apiv3.unsorted.BlockingCallback;
import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.ErrorUtils;
public final class DELETEPunishments implements Handler<RoutingContext> { public final class DELETEPunishmentsId implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
BlockingCallback<Punishment> punishmentCallback = new BlockingCallback<>(); BlockingCallback<Punishment> punishmentCallback = new BlockingCallback<>();

View File

@ -17,7 +17,7 @@ import net.frozenorb.apiv3.util.ErrorUtils;
import java.util.List; import java.util.List;
public final class DELETEUserActivePunishment implements Handler<RoutingContext> { public final class DELETEUsersIdActivePunishment implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
BlockingCallback<User> userCallback = new BlockingCallback<>(); BlockingCallback<User> userCallback = new BlockingCallback<>();

View File

@ -6,7 +6,7 @@ import net.frozenorb.apiv3.APIv3;
import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.model.User;
import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.ErrorUtils;
public final class GETUser implements Handler<RoutingContext> { public final class GETUsersId implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
User.findById(ctx.request().getParam("id"), (user, error) -> { User.findById(ctx.request().getParam("id"), (user, error) -> {

View File

@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public final class GETUserDetails implements Handler<RoutingContext> { public final class GETUsersIdDetails implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
BlockingCallback<User> userCallback = new BlockingCallback<>(); BlockingCallback<User> userCallback = new BlockingCallback<>();

View File

@ -6,7 +6,7 @@ import net.frozenorb.apiv3.APIv3;
import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.model.User;
import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.ErrorUtils;
public final class GETUserPermissions implements Handler<RoutingContext> { public final class GETUsersIdPermissions implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
User.findById(ctx.request().getParam("id"), (user, error) -> { User.findById(ctx.request().getParam("id"), (user, error) -> {

View File

@ -9,7 +9,7 @@ import net.frozenorb.apiv3.unsorted.RequiresTotpResult;
import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.ErrorUtils;
import net.frozenorb.apiv3.util.IpUtils; import net.frozenorb.apiv3.util.IpUtils;
public final class GETUserRequiresTotp implements Handler<RoutingContext> { public final class GETUsersIdRequiresTotp implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
User.findById(ctx.request().getParam("id"), (user, error) -> { User.findById(ctx.request().getParam("id"), (user, error) -> {

View File

@ -8,7 +8,7 @@ import net.frozenorb.apiv3.model.User;
import net.frozenorb.apiv3.unsorted.BlockingCallback; import net.frozenorb.apiv3.unsorted.BlockingCallback;
import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.ErrorUtils;
public final class GETUserVerifyPassword implements Handler<RoutingContext> { public final class GETUsersIdVerifyPassword implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
BlockingCallback<User> callback = new BlockingCallback<>(); BlockingCallback<User> callback = new BlockingCallback<>();

View File

@ -13,7 +13,7 @@ import net.frozenorb.apiv3.util.ErrorUtils;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
public final class POSTUserChangePassword implements Handler<RoutingContext> { public final class POSTUsersIdChangePassword implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
BlockingCallback<User> userCallback = new BlockingCallback<>(); BlockingCallback<User> userCallback = new BlockingCallback<>();

View File

@ -6,7 +6,7 @@ import net.frozenorb.apiv3.APIv3;
import net.frozenorb.apiv3.model.User; import net.frozenorb.apiv3.model.User;
import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.ErrorUtils;
public class POSTUserLeave implements Handler<RoutingContext> { public class POSTUsersIdLeave implements Handler<RoutingContext> {
@Override @Override
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {

View File

@ -17,7 +17,7 @@ import net.frozenorb.apiv3.util.UuidUtils;
import java.util.UUID; import java.util.UUID;
public final class POSTUserLogin implements Handler<RoutingContext> { public final class POSTUsersIdLogin implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
UUID uuid = UUID.fromString(ctx.request().getParam("id")); UUID uuid = UUID.fromString(ctx.request().getParam("id"));

View File

@ -13,7 +13,7 @@ import net.frozenorb.apiv3.util.ErrorUtils;
import java.util.Map; import java.util.Map;
public final class POSTUserNotify implements Handler<RoutingContext> { public final class POSTUsersIdNotify implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
BlockingCallback<User> userCallback = new BlockingCallback<>(); BlockingCallback<User> userCallback = new BlockingCallback<>();

View File

@ -15,7 +15,7 @@ import net.frozenorb.apiv3.util.ErrorUtils;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
public final class POSTUserPasswordReset implements Handler<RoutingContext> { public final class POSTUsersIdPasswordReset implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
BlockingCallback<User> userCallback = new BlockingCallback<>(); BlockingCallback<User> userCallback = new BlockingCallback<>();

View File

@ -16,7 +16,7 @@ import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern; import java.util.regex.Pattern;
public final class POSTUserRegister implements Handler<RoutingContext> { public final class POSTUsersIdRegister implements Handler<RoutingContext> {
private static final Pattern VALID_EMAIL_PATTERN = Pattern.compile( private static final Pattern VALID_EMAIL_PATTERN = Pattern.compile(
"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$",

View File

@ -12,7 +12,7 @@ import net.frozenorb.apiv3.unsorted.BlockingCallback;
import net.frozenorb.apiv3.util.ErrorUtils; import net.frozenorb.apiv3.util.ErrorUtils;
import net.frozenorb.apiv3.util.TotpUtils; import net.frozenorb.apiv3.util.TotpUtils;
public final class POSTUserSetupTotp implements Handler<RoutingContext> { public final class POSTUsersIdSetupTotp implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
BlockingCallback<User> userCallback = new BlockingCallback<>(); BlockingCallback<User> userCallback = new BlockingCallback<>();

View File

@ -13,7 +13,7 @@ import net.frozenorb.apiv3.util.TotpUtils;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
public final class POSTUserVerifyTotp implements Handler<RoutingContext> { public final class POSTUsersIdVerifyTotp implements Handler<RoutingContext> {
public void handle(RoutingContext ctx) { public void handle(RoutingContext ctx) {
BlockingCallback<User> userCallback = new BlockingCallback<>(); BlockingCallback<User> userCallback = new BlockingCallback<>();