File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
supertokens_python/recipe/dashboard Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 17
17
18
18
if TYPE_CHECKING :
19
19
from supertokens_python .recipe .dashboard .interfaces import APIInterface , APIOptions
20
- from supertokens_python .types import APIResponse
21
20
22
21
from supertokens_python .normalised_url_path import NormalisedURLPath
23
22
from supertokens_python .querier import Querier
23
+ from supertokens_python .recipe .dashboard .interfaces import SearchTagsOK
24
24
25
25
26
- async def handle_get_tags (_ : APIInterface , __ : APIOptions ) -> APIResponse :
26
+ async def handle_get_tags (_ : APIInterface , __ : APIOptions ) -> SearchTagsOK :
27
27
response = await Querier .get_instance ().send_get_request (
28
28
NormalisedURLPath ("/user/search/tags" )
29
29
)
30
- return response
30
+ return SearchTagsOK ( tags = response [ "tags" ])
Original file line number Diff line number Diff line change @@ -293,3 +293,14 @@ class SignOutOK(APIResponse):
293
293
294
294
def to_json (self ):
295
295
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 }
You can’t perform that action at this time.
0 commit comments