From bfa238c056f31f36c00faad1c5995cbb8af3bd26 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 26 Jan 2025 14:04:11 +0200 Subject: feat!: Rework all views to be used with the router --- controllers/meta.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'controllers/meta.php') diff --git a/controllers/meta.php b/controllers/meta.php index e567ac3..e20bbfc 100644 --- a/controllers/meta.php +++ b/controllers/meta.php @@ -1,18 +1,13 @@ call_handler('on_post'), - 'GET' => call_handler('on_get'), - 'PUT' => call_handler('on_put'), - 'DELETE' => call_handler('on_delete'), +switch ($_SERVER['REQUEST_METHOD']) { + case 'POST': call_handler('Controller\on_post'); break; + case 'PUT': call_handler('Controller\on_put'); break; + case 'DELETE': call_handler('Controller\on_delete'); break; }; -- cgit v1.2.3