mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-22 15:21:01 +00:00
Make emoji picker work on client apps
This commit is contained in:
parent
134bacd7ba
commit
3907a10d2e
3 changed files with 12 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
from .accounts import * # noqa
|
||||
from .apps import * # noqa
|
||||
from .emoji import * # noqa
|
||||
from .filters import * # noqa
|
||||
from .instance import * # noqa
|
||||
from .media import * # noqa
|
||||
|
|
10
api/views/emoji.py
Normal file
10
api/views/emoji.py
Normal file
|
@ -0,0 +1,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()]
|
|
@ -1,7 +1,6 @@
|
|||
from api.decorators import identity_required
|
||||
from api.views.base import api_router
|
||||
|
||||
from ..decorators import identity_required
|
||||
|
||||
|
||||
@api_router.get("/v1/filters")
|
||||
@identity_required
|
||||
|
|
Loading…
Reference in a new issue