Skip to content

Commit

Permalink
user management update
Browse files Browse the repository at this point in the history
  • Loading branch information
RemezovaJulia committed Jun 9, 2023
1 parent 5fcd9bd commit b83b968
Show file tree
Hide file tree
Showing 14 changed files with 344 additions and 165 deletions.
13 changes: 13 additions & 0 deletions internal/api/v1/handlers/usersmanagement_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ func FriedUser(c *gin.Context, app *app.App) {
"error": "Ошибка сервера",
})
}

if err := app.Cache.LoadEmployees(); err != nil {
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{
"error": "Ошибка сервера",
})
}
c.JSON(http.StatusOK, gin.H{
"message": "Пользователь успешно Уволен",
})
Expand All @@ -67,6 +73,13 @@ func RevertUser(c *gin.Context, app *app.App) {
"error": "Ошибка сервера",
})
}

if err := app.Cache.LoadEmployees(); err != nil {
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{
"error": "Ошибка сервера",
})
}

c.JSON(http.StatusOK, gin.H{
"message": "Пользователь успешно Вернут",
})
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

1 change: 0 additions & 1 deletion internal/public/css/dashboard.99caeb1482c0cd27f4b1.css.map

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/public/css/user.2d0c31ee7c12f37b7b60.css.map

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b83b968

Please sign in to comment.