chore: format server code

This commit is contained in:
email
2022-02-18 22:21:10 +08:00
parent 6f3663cd96
commit 3874523e61
8 changed files with 36 additions and 12 deletions

View File

@ -34,6 +34,7 @@ func (s *Server) registerUserRoutes(g *echo.Group) {
return nil
})
g.POST("/user/rename_check", func(c echo.Context) error {
userRenameCheck := &api.UserRenameCheck{}
if err := json.NewDecoder(c.Request().Body).Decode(userRenameCheck); err != nil {
@ -64,6 +65,7 @@ func (s *Server) registerUserRoutes(g *echo.Group) {
return nil
})
g.POST("/user/password_check", func(c echo.Context) error {
userId := c.Get(getUserIdContextKey()).(int)
userPasswordCheck := &api.UserPasswordCheck{}
@ -96,6 +98,7 @@ func (s *Server) registerUserRoutes(g *echo.Group) {
return nil
})
g.PATCH("/user/me", func(c echo.Context) error {
userId := c.Get(getUserIdContextKey()).(int)
userPatch := &api.UserPatch{