This commit is contained in:
parent
6ef2c47e11
commit
92246bc9d1
|
@ -2,6 +2,7 @@
|
|||
- enabling sentry
|
||||
- long query log report added
|
||||
- editor fixes
|
||||
- authors links cannot be updated by update_shout anymore
|
||||
|
||||
[0.3.0]
|
||||
- Shout.featured_at timestamp of the frontpage featuring event
|
||||
|
|
|
@ -67,7 +67,7 @@ async def create_shout(_, info, inp):
|
|||
session.add(new_shout)
|
||||
session.commit()
|
||||
|
||||
# NOTE: shout made by one author
|
||||
# NOTE: requesting new shout back
|
||||
shout = session.query(Shout).where(Shout.slug == slug).first()
|
||||
if shout:
|
||||
shout_dict = shout.dict()
|
||||
|
@ -84,7 +84,7 @@ async def create_shout(_, info, inp):
|
|||
# notifier
|
||||
# await notify_shout(shout_dict, 'create')
|
||||
|
||||
return {'shout': shout_dict}
|
||||
return { 'shout': shout.dict() }
|
||||
|
||||
return {'error': 'cant create shout'}
|
||||
|
||||
|
@ -178,6 +178,7 @@ async def update_shout(_, info, shout_id, shout_input=None, publish=False):
|
|||
.filter(Shout.id == shout_id)
|
||||
.first()
|
||||
)
|
||||
|
||||
if not shout:
|
||||
return {'error': 'shout not found'}
|
||||
if shout.created_by is not author.id and author.id not in shout.authors and 'editor' not in roles:
|
||||
|
|
|
@ -6,7 +6,6 @@ input ShoutInput {
|
|||
description: String
|
||||
layout: String
|
||||
media: String
|
||||
authors: [String]
|
||||
topics: [TopicInput]
|
||||
community: Int
|
||||
subtitle: String
|
||||
|
|
Loading…
Reference in New Issue
Block a user