// DeleteUser allows to delete a user by its id
DeleteUser allows to delete a user by its id
// DeleteUser allows to delete a user by its id
func (db *Mngo) DeleteUser(userID string) error {
	c := db.database.Collection(models.UsersCollection)
	_, err := c.DeleteOne(db.context, bson.M{"_id": userID})
	if err != nil {
		return helpers.NewError(http.StatusInternalServerError, "user_delete_failed", "Failed to delete the user", err)
	}
	return nil
}
func ( db * Mngo ) DeleteUser ( userID string ) error { c := db . database . Collection ( models . UsersCollection ) _ , err := c . DeleteOne ( db . context , bson . M { " " : userID } ) if err != nil { return helpers . NewError ( http . StatusInternalServerError , " " , " " , err ) } return nil }
DeleteUser allows to delete a user by its id
DeleteUser allows to delete a user by its id
//res.DeletedCount