add search method

This commit is contained in:
kandrusyak
2023-10-09 03:21:48 +03:00
parent cf30194963
commit ddc083bbee
2 changed files with 15 additions and 0 deletions

View File

@@ -56,6 +56,20 @@ func CreatePD(c echo.Context) error {
return c.Blob(resp.StatusCode, resp.Header.Get("Content-Type"), data)
}
func SearchPD(c echo.Context) error {
data, err, resp := api.PostRequest(
config.Env.MSHosts.PersonsHost+"/persons/search/",
c.Request().Body,
c.Request().Header)
if err != nil {
return c.NoContent(http.StatusBadGateway)
}
return c.Blob(resp.StatusCode, resp.Header.Get("Content-Type"), data)
}
func CreateDocuments(c echo.Context) error {
data, err, resp := api.PostRequest(
config.Env.MSHosts.PersonsHost+"/documents/",