ALIS-1138: 違反報告APIの拡張 by ippei-fukamatsu · Pull Request #138 · AlisProject/serverless-application · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f3489e1
違反報告系の定数を追加
ippei-fukamatsu Jul 13, 2018
87937f2
パラメーターに違反報告の詳細を追加
ippei-fukamatsu Jul 13, 2018
f7592fe
入力の検証を追加中
ippei-fukamatsu Jul 13, 2018
b873079
print削除
ippei-fukamatsu Jul 13, 2018
d97f069
特定の理由の時に依存項目の入力チェック
ippei-fukamatsu Jul 14, 2018
cb36b08
リファクタリングついでにテストFIX
ippei-fukamatsu Jul 14, 2018
fc446e8
不要な差分がでてたので戻した
ippei-fukamatsu Jul 14, 2018
e71fb42
空の行削除
ippei-fukamatsu Jul 14, 2018
4a44306
追加項目がinsertされていないという痛恨のミス
ippei-fukamatsu Jul 14, 2018
38756fb
pycodestyle対応
ippei-fukamatsu Jul 14, 2018
b987a61
桁数、入力チェックルールの変更
ippei-fukamatsu Jul 24, 2018
c416670
一旦前の実装に戻す
ippei-fukamatsu Jul 24, 2018
a4cb890
テストパターンにそれぞれの理由での正常系を追加
ippei-fukamatsu Jul 25, 2018
51bbe61
メソッド名変更
ippei-fukamatsu Jul 25, 2018
4c0352d
差分がでないよう元に戻す
ippei-fukamatsu Jul 25, 2018
abe0a62
リファクタ: ご指摘いただいた通りシンプルに書けたので修正
ippei-fukamatsu Jul 30, 2018
1ced9c0
空文字があり得る項目のテストケースを追加
ippei-fukamatsu Jul 30, 2018
825e9a1
念のため登録前に空文字をNoneに変換してくれる共通関数を呼び出し
ippei-fukamatsu Jul 30, 2018
c3a40b5
空の行を削除
ippei-fukamatsu Jul 30, 2018
7c569a2
shared-local-instance.dbが混じってしまったので削除
ippei-fukamatsu Jul 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions api-template.yaml
31 changes: 30 additions & 1 deletion src/common/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,32 @@
'type': 'string',
'minLength': 1,
'maxLength': 150
},
'fraud_user': {
'reason': {
'type': 'string',
'enum': [
'violence',
'spam',
'plagiarism',
'slander',
'illegal',
'other'
]
},
'plagiarism_url': {
'type': 'string',
'format': 'uri',
'maxLength': 2048
},
'plagiarism_description': {
'type': 'string',
'maxLength': 1000
},
'illegal_content': {
'type': 'string',
'maxLength': 1000
}
}
}

Expand Down Expand Up @@ -146,7 +172,6 @@
'xml', 'year'
]


LIKED_RETRY_COUNT = 3

ARTICLE_IMAGE_MAX_WIDTH = 3840
Expand All @@ -160,3 +185,7 @@

LIKE_NOTIFICATION_TYPE = 'like'
COMMENT_NOTIFICATION_TYPE = 'comment'

FRAUD_NEED_ORIGINAL_REASONS = ['plagiarism']

FRAUD_NEED_DETAIL_REASONS = ['illegal', 'other']
33 changes: 30 additions & 3 deletions src/handlers/me/articles/fraud/create/me_articles_fraud_create.py
Loading