Skip to content

Commit 0597dab

Browse files
committed
tested and works
1 parent 21400fc commit 0597dab

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

supertokens_python/recipe/dashboard/api/search/getTags.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
if TYPE_CHECKING:
1919
from supertokens_python.recipe.dashboard.interfaces import APIInterface, APIOptions
20-
from supertokens_python.types import APIResponse
2120

2221
from supertokens_python.normalised_url_path import NormalisedURLPath
2322
from supertokens_python.querier import Querier
23+
from supertokens_python.recipe.dashboard.interfaces import SearchTagsOK
2424

2525

26-
async def handle_get_tags(_: APIInterface, __: APIOptions) -> APIResponse:
26+
async def handle_get_tags(_: APIInterface, __: APIOptions) -> SearchTagsOK:
2727
response = await Querier.get_instance().send_get_request(
2828
NormalisedURLPath("/user/search/tags")
2929
)
30-
return response
30+
return SearchTagsOK(tags=response["tags"])

supertokens_python/recipe/dashboard/interfaces.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,3 +293,14 @@ class SignOutOK(APIResponse):
293293

294294
def to_json(self):
295295
return {"status": self.status}
296+
297+
298+
class SearchTagsOK(APIResponse):
299+
status: str = "OK"
300+
tags: List[str]
301+
302+
def __init__(self, tags: List[str]) -> None:
303+
self.tags = tags
304+
305+
def to_json(self):
306+
return {"status": self.status, "tags": self.tags}

0 commit comments

Comments
 (0)