diff --git a/hinghwa-dict-backend/article/views.py b/hinghwa-dict-backend/article/views.py index dd108eb1..dc271f0a 100644 --- a/hinghwa-dict-backend/article/views.py +++ b/hinghwa-dict-backend/article/views.py @@ -79,7 +79,9 @@ def post(self, request) -> JsonResponse: article.author = user article.save() content = f"我创建了文章(id={article.id}),请及时去审核" - sendNotification(article.author, None, content, title="【提醒】文章待审核") + sendNotification( + article.author, None, content, title="【提醒】文章待审核", action_object=article + ) return JsonResponse({"id": article.id}, status=200) # AT0202 文章内容批量获取 @@ -162,7 +164,9 @@ def put(self, request, id) -> JsonResponse: article.visibility = False article.save() content = f"我修改了文章(id={article.id}),请及时去审核" - sendNotification(article.author, None, content, title="【提醒】文章待审核") + sendNotification( + article.author, None, content, title="【提醒】文章待审核", action_object=article + ) return JsonResponse({}, status=200) # AT0102 删除文章 @@ -197,7 +201,7 @@ def put(self, request, id) -> JsonResponse: None, [article.author], content=content, - target=article, + action_object=article, title="【通知】文章审核结果", ) article.save() diff --git a/hinghwa-dict-backend/word/application/views.py b/hinghwa-dict-backend/word/application/views.py index 9d86bba4..bbaac6fd 100644 --- a/hinghwa-dict-backend/word/application/views.py +++ b/hinghwa-dict-backend/word/application/views.py @@ -179,5 +179,6 @@ def put(self, request, id) -> JsonResponse: content, target=application, title=title, + action_object=application.word, ) return JsonResponse({"word": feedback}, status=200) diff --git a/hinghwa-dict-backend/word/pronunciation/views.py b/hinghwa-dict-backend/word/pronunciation/views.py index 4c81132d..9846d788 100644 --- a/hinghwa-dict-backend/word/pronunciation/views.py +++ b/hinghwa-dict-backend/word/pronunciation/views.py @@ -336,7 +336,7 @@ def delete(request, id): get_request_user(request), [pronunciation.contributor], f"您的语音(id={pronunciation.id}) 已被删除,理由是:\n\t{message}", - target=pronunciation, + action_object=pronunciation, title=f"【通知】语音{pronunciation.word.word}被删除", ) @@ -376,7 +376,7 @@ def post(request, id): verifier, [contributor], content=content + reason, - target=pronunciation, + action_object=pronunciation, title=f"【通知】语音({pronunciation.word.word})审核结果", ) return JsonResponse(transaction_info, status=200) @@ -406,7 +406,7 @@ def put(request, id): verifier, [contributor], content=content + f",理由是:{message}。", - target=pronunciation, + action_object=pronunciation, title=f"【通知】语音({pronunciation.word.word})审核结果变更", ) return JsonResponse(transaction_info, status=200)