minor fixes

This commit is contained in:
SowinskiBraeden committed 2022-06-13 14:12:45 -07:00
1 parent 61d97ea429
commit e2d085a534
2 files changed
+12 -6

No files matched your search

+2 -2
View File
@@ -1081,7 +1081,7 @@ func DeleteContact(c *fiber.Ctx) error {
}
// Check required fields are included
if data["id"] == "" {
if data["_id"] == "" {
cancel()
return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
"success": false,
@@ -1089,7 +1089,7 @@ func DeleteContact(c *fiber.Ctx) error {
})
}
_, err := contactCollection.DeleteOne(ctx, bson.M{"_id": data["id"]})
_, err := contactCollection.DeleteOne(ctx, bson.M{"_id": data["_id"]})
if err != nil {
cancel()
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{