summaryrefslogtreecommitdiffstats
path: root/api/views/emoji.py
blob: 0cdefb4c1a91e260201f829307b170321263aeef (plain)
1
2
3
4
5
6
7
8
9
10
from activities.models import Emoji
from api.decorators import identity_required
from api.schemas import CustomEmoji
from api.views.base import api_router


@api_router.get("/v1/custom_emojis", response=list[CustomEmoji])
@identity_required
def emojis(request):
    return [e.to_mastodon_json() for e in Emoji.objects.usable()]