mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-25 16:51:00 +00:00
5d2ed9edfe
Removes django-ninja and replaces it with a new API framework, "hatchway". I plan to move hatchway into its own project very soon.
10 lines
264 B
Python
10 lines
264 B
Python
from activities.models import Emoji
|
|
from api.schemas import CustomEmoji
|
|
from hatchway import api_view
|
|
|
|
|
|
@api_view.get
|
|
def emojis(request) -> list[CustomEmoji]:
|
|
return [
|
|
CustomEmoji.from_emoji(e) for e in Emoji.objects.usable().filter(local=True)
|
|
]
|