summaryrefslogtreecommitdiff
path: root/src/gemini/Gemini.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/gemini/Gemini.php')
-rw-r--r--src/gemini/Gemini.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gemini/Gemini.php b/src/gemini/Gemini.php
index 4567958..9d34b30 100644
--- a/src/gemini/Gemini.php
+++ b/src/gemini/Gemini.php
@@ -94,6 +94,20 @@ class Gemini
$response = $buildingController->levelUp($request);
}
+ else if (preg_match('@village/(\d+)/(\d+)/building/(\w+)/manage@', $request->getPath(), $routeMatch)) {
+ $request
+ ->set('x', $routeMatch[1])
+ ->set('y', $routeMatch[2])
+ ->set('type', $routeMatch[3]);
+
+ if ($request->get('type') === 'Storage') {
+ $response = new Response(
+ statusCode: Status::REDIRECT_PERMANENT,
+ meta: "/village/{$routeMatch[1]}/{$routeMatch[2]}/storage/config"
+ );
+ }
+ }
+
else if (preg_match('@village/(\d+)/(\d+)/unit/(\w+)/create@', $request->getPath(), $routeMatch)) {
$request
->set('x', $routeMatch[1])
@@ -189,6 +203,26 @@ class Gemini
$response = $eventController->cancel($request);
}
+ else if (preg_match('@account/username@', $request->getPath(), $routeMatch)) {
+ $userController = new User();
+ $response = $userController->accountUsername($request);
+ }
+
+ else if (preg_match('@account/email@', $request->getPath(), $routeMatch)) {
+ $userController = new User();
+ $response = $userController->accountEmail($request);
+ }
+
+ else if (preg_match('@account/password@', $request->getPath(), $routeMatch)) {
+ $userController = new User();
+ $response = $userController->accountPassword($request);
+ }
+
+ else if (preg_match('@account$@', $request->getPath(), $routeMatch)) {
+ $userController = new User();
+ $response = $userController->account($request);
+ }
+
return $response;
});