add options methods for system

Signed-off-by: Yhz <yinghao.zou@zilliz.com>
pull/1602/head
Yhz 2020-03-10 15:59:08 +08:00
parent 596d41b111
commit f722119188
1 changed files with 7 additions and 4 deletions

View File

@ -617,10 +617,7 @@ class WebController : public oatpp::web::server::api::ApiController {
}
ADD_CORS(VectorsOp)
/*************
* Search
* Delete by ID
* */
ENDPOINT("PUT", "/collections/{collection_name}/vectors", VectorsOp,
PATH(String, collection_name), BODY_STRING(String, body)) {
TimeRecorder tr(std::string(WEB_LOG_PREFIX) + "PUT \'/collections/" + collection_name->std_str() + "/vectors\'");
@ -648,6 +645,12 @@ class WebController : public oatpp::web::server::api::ApiController {
return response;
}
ADD_CORS(SystemOptions)
ENDPOINT("OPTIONS", "/system/{info}", SystemOptions) {
return createResponse(Status::CODE_204, "No Content");
}
ADD_CORS(SystemInfo)
ENDPOINT("GET", "/system/{info}", SystemInfo, PATH(String, info), QUERIES(const QueryParams&, query_params)) {