mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
Set the moderator when moderating news
This commit is contained in:
@ -45,6 +45,7 @@ class NewsController(ControllerBase):
|
||||
news = self.get_object_or_exception(News, id=news_id)
|
||||
if not news.is_moderated:
|
||||
news.is_moderated = True
|
||||
news.moderator = self.context.request.user
|
||||
news.save()
|
||||
|
||||
@route.delete(
|
||||
|
Reference in New Issue
Block a user