mirror of
https://github.com/DreamExposure/DisCal-Discord-Bot.git
synced 2026-02-14 15:38:42 -06:00
404 now redirects to home page.
This commit is contained in:
@@ -104,6 +104,7 @@ public class ApplicationHandler {
|
||||
Main.client.logout();
|
||||
} catch (DiscordException e) {
|
||||
//No need to print, exiting anyway.
|
||||
e.printStackTrace();
|
||||
}
|
||||
TimeManager.getManager().shutdown();
|
||||
DatabaseManager.getManager().disconnectFromMySQL();
|
||||
|
||||
@@ -22,6 +22,11 @@ public class SparkUtils {
|
||||
|
||||
staticFileLocation("/web/public"); // Main site location
|
||||
|
||||
notFound(((request, response) -> {
|
||||
response.redirect("/");
|
||||
return response.body();
|
||||
}));
|
||||
|
||||
//Register the API Endpoints
|
||||
before("/api/*", (request, response) -> {
|
||||
if (!request.requestMethod().equalsIgnoreCase("POST")) {
|
||||
|
||||
Reference in New Issue
Block a user