validateAPIDocUpdate finds disallowed document properties that are allowed in through blip and/or import but not through the REST API
(body Body)
| 41 | // validateAPIDocUpdate finds disallowed document properties that are allowed in through blip and/or import but not through |
| 42 | // the REST API |
| 43 | func validateAPIDocUpdate(body Body) error { |
| 44 | // VaLidation for disallowed properties for blip and import should be done in validateNewBody |
| 45 | // _rev, _attachments, _id are validated before reaching this function (due to endpoint specific behaviour) |
| 46 | if _, ok := body[base.SyncPropertyName]; ok { |
| 47 | return base.HTTPErrorf(http.StatusBadRequest, "document-top level property '_sync' is a reserved internal property") |
| 48 | } |
| 49 | return nil |
| 50 | } |
| 51 | |
| 52 | // validateImportBody validates incoming import bodies |
| 53 | func validateImportBody(body Body) error { |
no test coverage detected