From 428cf9066aac089bc2326db5bfdcbfb93d10c3e6 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sun, 18 Oct 2015 15:46:58 -0700 Subject: [PATCH] map api uses get or post --- controllers/main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/main.php b/controllers/main.php index 3fe1fc8..c1f231a 100644 --- a/controllers/main.php +++ b/controllers/main.php @@ -9,9 +9,9 @@ $app->get('/map', function() use($app) { return Savant\render('map'); }); -$app->get('/map/img', function() use($app) { +$app->map('/map/img', function() use($app) { $params = $app->request()->params(); $app->response['Content-type'] = 'image/png'; $assetPath = dirname(__FILE__) . '/../p3k/map/images'; $map = p3k\geo\StaticMap\generate($params, null, $assetPath); -}); +})->via('GET','POST');