mirror of
https://github.com/daledavies/jump.git
synced 2026-05-06 20:16:58 +02:00
Refactor APIs to use routing
This commit is contained in:
@@ -26,6 +26,15 @@ class Main {
|
||||
$this->router->addRoute('/tag/<tag>', [
|
||||
'class' => 'Jump\Pages\TagPage'
|
||||
]);
|
||||
$this->router->addRoute('/api/icon?siteurl=<siteurl>', [
|
||||
'class' => 'Jump\API\Icon'
|
||||
]);
|
||||
$this->router->addRoute('/api/unsplash[/<token>]', [
|
||||
'class' => 'Jump\API\Unsplash'
|
||||
]);
|
||||
$this->router->addRoute('/api/weather[/<token>[/<lat>[/<lon>]]]', [
|
||||
'class' => 'Jump\API\Weather'
|
||||
]);
|
||||
}
|
||||
|
||||
function init() {
|
||||
|
||||
Reference in New Issue
Block a user