* Add basic tests for Analytics service * User/Organization are always required * Add some data to the test * Use queries and date times * Fix AnalyticsService interface in the controller * s/HTTP_API_KEY/api-key * Defend against nils and support datetime objects * Update app/services/analytics_service.rb Co-Authored-By: rhymes <rhymesete@gmail.com> * Use SQL sum, not Rails sum * Group average_read_time * Use SQL, not Rails * Use ISO date * Fix specs |
||
|---|---|---|
| .. | ||
| analytics_service_spec.rb | ||