Sextant-WDB/sextant-ng — pull request #14 by david-davidson (2014-10-05 20:52:22+00:00)
Title: Add a button that clears visit data for the current domain

OK, here's the real delete-visits-for-current-domain PR. @BrockBeaudry, we'd talked about having the endpoint 1.) find the domain that matches the req.params domain ID (from the REST request) and 2.) delete the visits from that domain, but it looks like our domain schema doesn't hold visits at all (unless I'm missing something). With that in mind, and since the visit schema's domain_id !== a domain's real _id, I had the endpoint simply find the domain that matches the REST request, find visits where the host matches that domain, and remove those.