fix: Set response-success to true in delete report
Bugs (fixed): * When a report is successfully deleted, the response from the server indicates failure
This commit is contained in:
1 parent
5975e1bfb1
commit
9c6327160d
1 file changed
+2
-2
@@ -336,7 +336,6 @@ void AnalyticsServiceServer::delete_report(
|
||||
api::ResultMessage res;
|
||||
res.set_success(false);
|
||||
if (!present) {
|
||||
res.set_success(false);
|
||||
res.set_error_message("Could not find report");
|
||||
resp(res);
|
||||
return;
|
||||
@@ -345,6 +344,7 @@ void AnalyticsServiceServer::delete_report(
|
||||
me->reports_publisher.erase(id.data());
|
||||
me->reports_publisher.flush();
|
||||
me->reports_store->remove(me->reports_ns, {key});
|
||||
res.set_success(true);
|
||||
resp(res);
|
||||
}
|
||||
|
||||
@@ -403,4 +403,4 @@ void AnalyticsServiceServer::get_archived_theos(
|
||||
|
||||
AnalyticsServiceServer::~AnalyticsServiceServer() {}
|
||||
|
||||
} // namespace bts::analytics
|
||||
} // namespace bts::analytics
|
||||
Reference in new issue
Block a user