apis_v1_version.cc 772 B

1234567891011121314151617181920
  1. /*
  2. * @Author: lishengyin lishengyin@sz-sunwin.com
  3. * @Date: 2022-09-04 20:39:49
  4. * @LastEditors: lishengyin lishengyin@sz-sunwin.com
  5. * @LastEditTime: 2022-09-04 21:40:29
  6. * @FilePath: /gsd_check/controllers/apis_v1_version.cc
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. */
  9. #include "apis_v1_version.h"
  10. using namespace apis::v1;
  11. // Add definition of your processing function here
  12. void version::getVersion(const HttpRequestPtr& req, std::function<void (const HttpResponsePtr &)> &&callback){
  13. HttpResponsePtr resp;
  14. resp = HttpResponse::newHttpResponse();
  15. resp->setBody(gsd::config::getPtr()->getVersion());
  16. callback(resp);
  17. }