Skip to content

Commit

Permalink
Add stub API endpoint for user suggestion (api/v2/suggestions) (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuuji3 authored Aug 17, 2023
1 parent 1262c61 commit 679f0de
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
push,
search,
statuses,
suggestions,
tags,
timelines,
trends,
Expand Down Expand Up @@ -128,4 +129,6 @@
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),
]
16 changes: 16 additions & 0 deletions api/views/suggestions.py
Original file line number Diff line number Diff line change
@@ -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 []

0 comments on commit 679f0de

Please sign in to comment.