mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-16 11:35:59 +02:00
add tag endpoint
This commit is contained in:
@@ -289,3 +289,7 @@ class TagSchema(Schema):
|
|||||||
@router.get("/tags", response=List[TagSchema], url_name="get_tags")
|
@router.get("/tags", response=List[TagSchema], url_name="get_tags")
|
||||||
def get_tags(request):
|
def get_tags(request):
|
||||||
return Tag.objects.all()
|
return Tag.objects.all()
|
||||||
|
|
||||||
|
@router.get("/tag/{tag_id}", response=TagSchema, url_name="get_tag")
|
||||||
|
def get_tag(request, tag_id: str):
|
||||||
|
return Tag.objects.get(id=tag_id)
|
||||||
|
Reference in New Issue
Block a user