mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 07:04:27 -04:00
add tag endpoint
This commit is contained in:
parent
a271bcb4ce
commit
951025228f
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue