takahe/api/views/emoji.py

12 lines
265 B
Python
Raw Normal View History

from hatchway import api_view
2022-12-15 15:50:15 -08:00
from activities.models import Emoji
from api.schemas import CustomEmoji
@api_view.get
def emojis(request) -> list[CustomEmoji]:
return [
CustomEmoji.from_emoji(e) for e in Emoji.objects.usable().filter(local=True)
]