diff --git a/design/api.md b/design/api.md index ee9e7bc..a67f649 100644 --- a/design/api.md +++ b/design/api.md @@ -89,13 +89,13 @@ Example response: { "days": { "2016-05-01": { - "end_time_usec": 131595516000000, - "start_time_usec": 131587740000000, + "end_time_90k": 131595516000000, + "start_time_90k": 131587740000000, "total_duration_90k": 52617609 }, "2016-05-02": { - "end_time_usec": 131603292000000, - "start_time_usec": 131595516000000, + "end_time_90k": 131603292000000, + "start_time_90k": 131595516000000, "total_duration_90k": 20946022 } }, diff --git a/src/web.cc b/src/web.cc index 8e440f5..da12741 100644 --- a/src/web.cc +++ b/src/web.cc @@ -316,9 +316,9 @@ void WebInterface::HandleJsonCameraDetail(evhttp_request *req, Json::Value days(Json::objectValue); std::string error_message; for (const auto &day : camera_row.days) { - int64_t start_time_usec; - int64_t end_time_usec; - if (!GetDayBounds(day.first, &start_time_usec, &end_time_usec, + int64_t start_time_90k; + int64_t end_time_90k; + if (!GetDayBounds(day.first, &start_time_90k, &end_time_90k, &error_message)) { return evhttp_send_error( req, HTTP_INTERNAL, @@ -326,8 +326,8 @@ void WebInterface::HandleJsonCameraDetail(evhttp_request *req, } Json::Value day_val(Json::objectValue); - day_val["start_time_usec"] = static_cast(start_time_usec); - day_val["end_time_usec"] = static_cast(end_time_usec); + day_val["start_time_90k"] = static_cast(start_time_90k); + day_val["end_time_90k"] = static_cast(end_time_90k); day_val["total_duration_90k"] = static_cast(day.second); days[day.first] = day_val; }