Merge pull request #289 from curquiza/status204-delete-index

Change the HTTP status code on index deletion
This commit is contained in:
Clément Renault 2019-11-13 15:33:27 +01:00 committed by GitHub
commit c734af55c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -187,7 +187,7 @@ pub async fn delete_index(ctx: Context<Data>) -> SResult<StatusCode> {
.map_err(ResponseError::internal)?; .map_err(ResponseError::internal)?;
if found { if found {
Ok(StatusCode::OK) Ok(StatusCode::NO_CONTENT)
} else { } else {
Ok(StatusCode::NOT_FOUND) Ok(StatusCode::NOT_FOUND)
} }