fix: no need to parse date ourself, mastodon.py v1.1.0 does it
This commit is contained in:
parent
5a81c2bf14
commit
2f426fe5f7
|
@ -150,7 +150,7 @@ def post_from_api_object(obj, instance):
|
||||||
favourite=obj['favourited'],
|
favourite=obj['favourited'],
|
||||||
has_media=('media_attachments' in obj
|
has_media=('media_attachments' in obj
|
||||||
and bool(obj['media_attachments'])),
|
and bool(obj['media_attachments'])),
|
||||||
created_at=iso8601.parse_date(obj['created_at']),
|
created_at=obj['created_at'],
|
||||||
author_id=account_from_api_object(obj['account'], instance).id,
|
author_id=account_from_api_object(obj['account'], instance).id,
|
||||||
direct=obj['visibility'] == 'direct',
|
direct=obj['visibility'] == 'direct',
|
||||||
)
|
)
|
||||||
|
|
|
@ -13,9 +13,10 @@ def app(redisdb):
|
||||||
app_.config['REDIS_URI'] = 'redis://localhost:15487'
|
app_.config['REDIS_URI'] = 'redis://localhost:15487'
|
||||||
app_.debug = True
|
app_.debug = True
|
||||||
|
|
||||||
@app_.route('/')
|
@app_.route('/', defaults={'name': 'world'})
|
||||||
def hello():
|
@app_.route('/<name>')
|
||||||
return 'Hello, world!'
|
def hello(name='world'):
|
||||||
|
return 'Hello, {name}!'.format(name=name)
|
||||||
with app_.app_context():
|
with app_.app_context():
|
||||||
yield app_
|
yield app_
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue