add my events

This commit is contained in:
kandrusyak
2023-08-03 01:14:57 +03:00
parent 8b1398a2a6
commit 43f4a9be2b
2 changed files with 13 additions and 0 deletions

View File

@@ -19,6 +19,18 @@ func GetEvents(c echo.Context) error {
return c.Blob(resp.StatusCode, resp.Header.Get("Content-Type"), data)
}
func GetMyEvents(c echo.Context) error {
data, err, resp := api.GetRequest(
config.Env.MSHosts.EventsHost+"/me",
c.Request().Header, c.Request().URL.RawQuery)
if err != nil {
return c.NoContent(http.StatusBadGateway)
}
return c.Blob(resp.StatusCode, resp.Header.Get("Content-Type"), data)
}
func GetEvent(c echo.Context) error {
id := c.Param("id")