API: Speed improvements
This commit is contained in:
parent
624231c665
commit
8b41d62a88
6 changed files with 50 additions and 9 deletions
|
@ -55,7 +55,7 @@
|
|||
use Friendica\Database\DBA;
|
||||
|
||||
if (!defined('DB_UPDATE_VERSION')) {
|
||||
define('DB_UPDATE_VERSION', 1493);
|
||||
define('DB_UPDATE_VERSION', 1494);
|
||||
}
|
||||
|
||||
return [
|
||||
|
|
|
@ -723,6 +723,22 @@
|
|||
INNER JOIN `post` ON `post-collection`.`uri-id` = `post`.`uri-id`
|
||||
INNER JOIN `post-thread` ON `post-thread`.`uri-id` = `post`.`parent-uri-id`"
|
||||
],
|
||||
"media-view" => [
|
||||
"fields" => [
|
||||
"uri-id" => ["post-media", "uri-id"],
|
||||
"type" => ["post-media", "type"],
|
||||
"received" => ["post", "received"],
|
||||
"created" => ["post", "created"],
|
||||
"private" => ["post", "private"],
|
||||
"visible" => ["post", "visible"],
|
||||
"deleted" => ["post", "deleted"],
|
||||
"thr-parent-id" => ["post", "thr-parent-id"],
|
||||
"author-id" => ["post", "author-id"],
|
||||
"gravity" => ["post", "gravity"],
|
||||
],
|
||||
"query" => "FROM `post-media`
|
||||
INNER JOIN `post` ON `post-media`.`uri-id` = `post`.`uri-id`"
|
||||
],
|
||||
"tag-view" => [
|
||||
"fields" => [
|
||||
"uri-id" => ["post-tag", "uri-id"],
|
||||
|
|
|
@ -239,6 +239,8 @@ return [
|
|||
'/followed_tags' => [Module\Api\Mastodon\FollowedTags::class, [R::GET ]],
|
||||
'/instance' => [Module\Api\Mastodon\Instance::class, [R::GET ]],
|
||||
'/instance/activity' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // @todo
|
||||
'/instance/domain_blocks' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // @todo
|
||||
'/instance/extended_description' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // @todo
|
||||
'/instance/peers' => [Module\Api\Mastodon\Instance\Peers::class, [R::GET ]],
|
||||
'/instance/rules' => [Module\Api\Mastodon\Instance\Rules::class, [R::GET ]],
|
||||
'/lists' => [Module\Api\Mastodon\Lists::class, [R::GET, R::POST]],
|
||||
|
@ -300,6 +302,9 @@ return [
|
|||
'/trends/statuses' => [Module\Api\Mastodon\Trends\Statuses::class, [R::GET ]],
|
||||
'/trends/tags' => [Module\Api\Mastodon\Trends\Tags::class, [R::GET ]],
|
||||
],
|
||||
'/v2' => [
|
||||
'/instance' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not supported
|
||||
],
|
||||
'/v{version:\d+}' => [
|
||||
'/admin/accounts' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not supported
|
||||
'/filters' => [Module\Api\Mastodon\Filters::class, [R::GET ]], // Dummy, not supported
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue