update user
This commit is contained in:
parent
7c3d6451bd
commit
52ba0aea42
@ -89,7 +89,7 @@ func (h *UserHandler) UpdateUser(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
logger.FromContext(c).Infof("UserHandler::UpdateUser -> Successfully updated user = %+v", userResponse)
|
logger.FromContext(c).Infof("UserHandler::UpdateUser -> Successfully updated user = %+v", userResponse)
|
||||||
c.JSON(http.StatusOK, userResponse)
|
c.JSON(http.StatusOK, contract.BuildSuccessResponse(userResponse))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *UserHandler) DeleteUser(c *gin.Context) {
|
func (h *UserHandler) DeleteUser(c *gin.Context) {
|
||||||
|
|||||||
@ -9,12 +9,14 @@ type HealthHandler interface {
|
|||||||
type UserHandler interface {
|
type UserHandler interface {
|
||||||
ListUsers(c *gin.Context)
|
ListUsers(c *gin.Context)
|
||||||
CreateUser(c *gin.Context)
|
CreateUser(c *gin.Context)
|
||||||
|
UpdateUser(c *gin.Context)
|
||||||
GetProfile(c *gin.Context)
|
GetProfile(c *gin.Context)
|
||||||
GetUserProfile(c *gin.Context)
|
GetUserProfile(c *gin.Context)
|
||||||
UpdateProfile(c *gin.Context)
|
UpdateProfile(c *gin.Context)
|
||||||
ChangePassword(c *gin.Context)
|
ChangePassword(c *gin.Context)
|
||||||
ListTitles(c *gin.Context)
|
ListTitles(c *gin.Context)
|
||||||
GetActiveUsersForMention(c *gin.Context)
|
GetActiveUsersForMention(c *gin.Context)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type FileHandler interface {
|
type FileHandler interface {
|
||||||
|
|||||||
@ -94,6 +94,7 @@ func (r *Router) addAppRoutes(rg *gin.Engine) {
|
|||||||
{
|
{
|
||||||
users.POST("", r.userHandler.CreateUser)
|
users.POST("", r.userHandler.CreateUser)
|
||||||
users.GET("", r.userHandler.ListUsers)
|
users.GET("", r.userHandler.ListUsers)
|
||||||
|
users.PUT("/:id", r.userHandler.UpdateUser)
|
||||||
users.GET("/profile", r.userHandler.GetProfile)
|
users.GET("/profile", r.userHandler.GetProfile)
|
||||||
users.GET("/:id/profile", r.userHandler.GetUserProfile)
|
users.GET("/:id/profile", r.userHandler.GetUserProfile)
|
||||||
users.PUT("/profile", r.userHandler.UpdateProfile)
|
users.PUT("/profile", r.userHandler.UpdateProfile)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user