Skip to content

Commit

Permalink
created indexer (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlmint committed Nov 26, 2020
1 parent b2e7df4 commit e5aa959
Show file tree
Hide file tree
Showing 10 changed files with 239 additions and 477 deletions.
5 changes: 5 additions & 0 deletions config/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,10 @@
"route": "/logout",
"controller": "/src/Controllers/AuthenticationController.php",
"function": "logout"
},
{
"route": "/search",
"controller": "/src/Controllers/SearchController.php",
"function": "search"
}
]
File renamed without changes.
Empty file added index.json
Empty file.
10 changes: 10 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ function loadClass($file)
$path = $_SERVER['REQUEST_URI'];
}

function endswith($string, $test)
{
return substr($string, strlen($string) - strlen($test), strlen($string)) ===
$test;
}

if (endswith($path, '/')) {
$path = substr($path, 0, strlen($path) - 1);
}

function getRoute($path)
{
$routes = json_decode(
Expand Down
File renamed without changes.
20 changes: 0 additions & 20 deletions search/app.php

This file was deleted.

Loading

0 comments on commit e5aa959

Please sign in to comment.