Skip to content

Commit f762522

Browse files
committed
Move the search endpoint to bootstrap so that it's exposed to tests
elifesciences/issues#9169
1 parent 9ca61e9 commit f762522

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/bootstrap.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
require_once __DIR__.'/../vendor/autoload.php';
2020
require_once __DIR__.'/helpers/ArticleSnippet.php';
21+
require_once __DIR__.'/endpoints/Search.php';
2122

2223
$dataDirSet = getenv('DATA_FOLDER');
2324
$dataDir = __DIR__.'/../'.($dataDirSet ? $dataDirSet : 'data');
@@ -2477,4 +2478,6 @@ function (Accept $type, string $id) use ($app) {
24772478
$response->isNotModified($request);
24782479
});
24792480

2481+
$app = Search::add($app);
2482+
24802483
return $app;

web/index.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
<?php
22

3-
require_once( __DIR__.'/../src/endpoints/Search.php');
43
$app = require __DIR__.'/../src/bootstrap.php';
54

6-
$app = Search::add($app);
7-
85
$app->run();

0 commit comments

Comments
 (0)