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