14 lines
345 B
PHP
14 lines
345 B
PHP
<?php
|
|
namespace Uiharu;
|
|
|
|
require_once __DIR__ . '/../uiharu.php';
|
|
|
|
// should be in a cron job
|
|
$db->execute('DELETE FROM `uih_metadata_cache` WHERE `metadata_created` < NOW() - INTERVAL 7 DAY');
|
|
|
|
$ctx->setupHttp();
|
|
|
|
$ctx->registerApi(new \Uiharu\Apis\v1_0($ctx));
|
|
$ctx->matchApi(filter_input(INPUT_SERVER, 'REQUEST_URI'));
|
|
|
|
$ctx->dispatchHttp();
|