mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: get user by username api (#2034)
This commit is contained in:
@ -258,8 +258,9 @@ func (s *APIV1Service) registerUserRoutes(g *echo.Group) {
|
||||
return c.JSON(http.StatusOK, userMessage)
|
||||
})
|
||||
|
||||
// GET /user/:username - Get user by username.
|
||||
g.GET("/user/:username", func(c echo.Context) error {
|
||||
// GET /user/name/:username - Get user by username.
|
||||
// NOTE: This should be moved to /api/v2/user/:username
|
||||
g.GET("/user/name/:username", func(c echo.Context) error {
|
||||
ctx := c.Request().Context()
|
||||
username := c.Param("username")
|
||||
user, err := s.Store.GetUser(ctx, &store.FindUser{Username: &username})
|
||||
|
Reference in New Issue
Block a user