Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

入力値のバリデーション #9

Closed
kk6 opened this issue Mar 21, 2017 · 1 comment
Closed

入力値のバリデーション #9

kk6 opened this issue Mar 21, 2017 · 1 comment

Comments

@kk6
Copy link
Owner

kk6 commented Mar 21, 2017

GET /v1/recordsfilter_has_record_comment の概要は

ミュート機能でミュートしているユーザを除外するかどうかを指定します。 true で除外、 false で除外しないようにできます。デフォルトは true (除外する) です。

のとおりだが、現状だとバリデーションしていないので filter_muted=0.5 とか送れてしまう。

試しに送ってみたらサーバー側ではバリデーションしてくれてるのでエラーが返ってくるが、クライアント側でもバリデーションしたほうがいいのでは。

{
"errors": [
  {
"type": "invalid_params",
"message": "リクエストに失敗しました",
"developer_message": "filter_has_record_commentには `true` または `false` を指定してください"
}
],
}
@kk6
Copy link
Owner Author

kk6 commented Apr 10, 2017

このライブラリでやる必要はない気がする。クライアントアプリ側で実装すべきでは。一旦忘れる。

@kk6 kk6 closed this as completed Apr 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant