[mastodon] Import mastodon API correctly
This commit is contained in:
parent
f7e73ea407
commit
2f32d949b4
|
@ -159,7 +159,7 @@ async def mastodon_create(instance_url, username, password, hood=Depends(get_hoo
|
|||
except MastodonError:
|
||||
logger.warning("Login to Mastodon failed.", exc_info=True)
|
||||
return # show error to user
|
||||
MastodonAccount.objects.create(
|
||||
return await MastodonAccount.objects.create(
|
||||
hood=hood,
|
||||
instance=instance,
|
||||
access_token=access_token,
|
||||
|
|
|
@ -15,6 +15,7 @@ from fastapi import APIRouter
|
|||
from kibicara.platforms.email.webapi import router as email_router
|
||||
from kibicara.platforms.telegram.webapi import router as telegram_router
|
||||
from kibicara.platforms.test.webapi import router as test_router
|
||||
from kibicara.platforms.mastodon.webapi import router as mastodon_router
|
||||
from kibicara.platforms.twitter.webapi import router as twitter_router
|
||||
from kibicara.platforms.twitter.webapi import twitter_callback_router
|
||||
from kibicara.webapi.admin import router as admin_router
|
||||
|
@ -37,6 +38,9 @@ hoods_router.include_router(
|
|||
hoods_router.include_router(
|
||||
twitter_router, prefix='/{hood_id}/twitter', tags=['twitter']
|
||||
)
|
||||
hoods_router.include_router(
|
||||
mastodon_router, prefix='/{hood_id}/mastodon', tags=['mastodon']
|
||||
)
|
||||
router.include_router(twitter_callback_router, prefix='/twitter', tags=['twitter'])
|
||||
hoods_router.include_router(email_router, prefix='/{hood_id}/email', tags=['email'])
|
||||
router.include_router(hoods_router, prefix='/hoods')
|
||||
|
|
Loading…
Reference in a new issue