vilnius / tvarkau-vilniu-ms

Tvarkau Vilnių backend
MIT License
9 stars 2 forks source link

New report registration should not expect report_status. #97

Closed mjurkus closed 6 years ago

mjurkus commented 6 years ago

Now when submitting new report receiving validation error. I think it should set report_status to initial - "Registruotas".

D/OkHttp: <-- 400 Bad Request https://api.tvarkaumiesta.lt/reports (61ms)
D/OkHttp: Date: Tue, 09 Oct 2018 19:54:05 GMT
D/OkHttp: Access-Control-Allow-Origin: *
D/OkHttp: Access-Control-Allow-Methods: POST, GET, OPTIONS, PATCH, DELETE
D/OkHttp: Access-Control-Allow-Headers: Authorization
D/OkHttp: X-Frame-Options: SAMEORIGIN
D/OkHttp: X-XSS-Protection: 1; mode=block
D/OkHttp: X-Content-Type-Options: nosniff
D/OkHttp: Content-Type: application/json; charset=utf-8
D/OkHttp: Cache-Control: no-cache
D/OkHttp: X-Request-Id: db8607ab-d566-43a5-ad25-b9ca86f4eff0
D/OkHttp: X-Runtime: 0.010532
D/OkHttp: Strict-Transport-Security: max-age=15552000; includeSubDomains
D/OkHttp: Connection: close
D/OkHttp: Transfer-Encoding: chunked
D/OkHttp: {"code":10,"message":"validation_error","errors":[{"field":"report_status","value":"translation missing: lt.activerecord.errors.models.report.attributes.report_status.required, negali būti tuščias"}]}
D/OkHttp: <-- END HTTP (203-byte body)
mjurkus commented 6 years ago

@laurynas