Fix typo.

This commit is contained in:
Kishore Nallan 2020-10-25 10:13:15 +05:30
parent f836a633b6
commit bfddcb9e13
2 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ Option<doc_seq_id_t> Collection::to_doc(const std::string & json_str, nlohmann::
}
if(document.count("id") != 0 && id != "" && document["id"] != id) {
return Option<doc_seq_id_t>(400, "The `id` of the resource does not match the `id` on the JSON body.");
return Option<doc_seq_id_t>(400, "The `id` of the resource does not match the `id` in the JSON body.");
}
if(document.count("id") == 0 && !id.empty()) {

View File

@ -2616,7 +2616,7 @@ TEST_F(CollectionTest, UpdateDocument) {
add_op = coll1->add(doc5.dump(), UPSERT, "799");
ASSERT_FALSE(add_op.ok());
ASSERT_EQ(400, add_op.code());
ASSERT_STREQ("The `id` of the resource does not match the `id` on the JSON body.", add_op.error().c_str());
ASSERT_STREQ("The `id` of the resource does not match the `id` in the JSON body.", add_op.error().c_str());
// passing an empty id should not succeed
nlohmann::json doc6;