Allow bookmarks to be sent to 3rd party services with Fever API

This commit is contained in:
Frederic Guillot 2017-01-03 20:57:33 -05:00
parent 2a87847289
commit f64e74952b
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@ require __DIR__.'/../app/common.php';
use Miniflux\Handler;
use Miniflux\Model;
use Miniflux\Session\SessionStorage;
register_shutdown_function(function () {
Miniflux\Helper\write_debug_file();
@ -36,6 +37,10 @@ function auth()
$user = Model\User\get_user_by_token('fever_api_key', $api_key);
$authenticated = $user !== null;
if ($authenticated) {
SessionStorage::getInstance()->setUser($user);
}
$response = array(
'api_version' => 3,
'auth' => (int) $authenticated,