mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine /api/v1/summaries, with code and server id.
This commit is contained in:
parent
9b3fdc74d8
commit
b486f6fe6b
2 changed files with 6 additions and 1 deletions
|
@ -267,9 +267,14 @@ SrsGoApiSummaries::~SrsGoApiSummaries()
|
|||
|
||||
int SrsGoApiSummaries::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
|
||||
{
|
||||
SrsStatistic* stat = SrsStatistic::instance();
|
||||
|
||||
SrsJsonObject* obj = SrsJsonAny::object();
|
||||
SrsAutoFree(SrsJsonObject, obj);
|
||||
|
||||
obj->set("code", SrsJsonAny::integer(ERROR_SUCCESS));
|
||||
obj->set("server", SrsJsonAny::integer(stat->server_id()));
|
||||
|
||||
srs_api_dump_summaries(obj);
|
||||
|
||||
return srs_api_response(w, r, obj->dumps());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue