Add stub API endpoint for user suggestion (api/v2/suggestions) (#631)
This commit is contained in:
parent
1262c619bb
commit
679f0def99
|
@ -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),
|
||||
]
|
||||
|
|
|
@ -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 []
|
Loading…
Reference in New Issue