add new endpoints

This commit is contained in:
andrusyakka
2023-08-15 17:47:31 +03:00
parent fe85ad5fe8
commit 932aaef2fc
4 changed files with 148 additions and 21 deletions

View File

@@ -107,13 +107,7 @@ func DeleteUser(c echo.Context) error {
func UpdateUser(c echo.Context) (err error) {
id := c.Param("id")
// Bind
u := new(model.User)
if err = c.Bind(u); err != nil {
return
}
data, err := api.PatchRequest(config.Env.MSHosts.UsersHost+"/"+id, u, c.Request().Header)
data, err, _ := api.PatchRequest(config.Env.MSHosts.UsersHost+"/"+id, c.Request().Body, c.Request().Header)
if err != nil {
return c.NoContent(http.StatusBadGateway)