mirror of
https://github.com/DreamExposure/DisCal-Discord-Bot.git
synced 2026-05-12 20:58:30 -05:00
Sometimes I'm really dumb and duplicate a line of code
This commit is contained in:
@@ -181,7 +181,6 @@ public class WebGuild {
|
||||
else
|
||||
data.put("settings", settings.toJson());
|
||||
|
||||
data.put("settings", settings.toJson());
|
||||
if (botNick != null && !botNick.equals(""))
|
||||
data.put("bot_nick", botNick);
|
||||
data.put("manage_server", manageServer);
|
||||
|
||||
@@ -46,12 +46,14 @@ public class Authentication {
|
||||
.setStatus(200)
|
||||
.setReason("Success")
|
||||
.setKeyUsed(key)
|
||||
.setFromDisCalNetwork(false)
|
||||
.setIsReadOnly(false);
|
||||
} else if (readOnlyKeys.containsKey(key)) {
|
||||
return new AuthenticationState(true)
|
||||
.setStatus(200)
|
||||
.setReason("Success")
|
||||
.setKeyUsed(key)
|
||||
.setFromDisCalNetwork(false)
|
||||
.setIsReadOnly(true);
|
||||
} else if (key.equals("teapot")) {
|
||||
return new AuthenticationState(false)
|
||||
@@ -69,13 +71,14 @@ public class Authentication {
|
||||
return new AuthenticationState(true)
|
||||
.setStatus(200)
|
||||
.setReason("Success")
|
||||
.setKeyUsed(key);
|
||||
.setKeyUsed(key)
|
||||
.setFromDisCalNetwork(false);
|
||||
}
|
||||
|
||||
//If we reach here, the API key does not exist or is blocked...
|
||||
return new AuthenticationState(false)
|
||||
.setStatus(405)
|
||||
.setReason("Method not allowed");
|
||||
.setStatus(401)
|
||||
.setReason("Authorization Denied");
|
||||
} else {
|
||||
Logger.getLogger().api("Attempted to use API without authorization header", request.getRemoteAddr());
|
||||
return new AuthenticationState(false)
|
||||
|
||||
Reference in New Issue
Block a user