Add stub API endpoint for user suggestion (api/v2/suggestions)

pull/631/head
TAKAHASHI Shuuji 2023-08-16 13:34:16 +09:00
rodzic 1262c619bb
commit 5d1dde8e10
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F15C887632129F5E
2 zmienionych plików z 19 dodań i 0 usunięć

Wyświetl plik

@ -18,6 +18,7 @@ from api.views import (
push,
search,
statuses,
suggestions,
tags,
timelines,
trends,
@ -128,4 +129,6 @@ urlpatterns = [
path("v1/trends/tags", trends.trends_tags),
path("v1/trends/statuses", trends.trends_statuses),
path("v1/trends/links", trends.trends_links),
# Suggestions
path("v2/suggestions", suggestions.suggested_users),
]

Wyświetl plik

@ -0,0 +1,16 @@
from django.http import HttpRequest
from hatchway import api_view
from api import schemas
from api.decorators import scope_required
@scope_required("read")
@api_view.get
def suggested_users(
request: HttpRequest,
limit: int = 10,
offset: int | None = None,
) -> list[schemas.Account]:
# We don't implement this yet
return []