MCPcopy Create free account
hub / github.com/bytebase/bytebase / getUser

Method getUser

backend/api/directory-sync/webhook.go:859–870  ·  view source on GitHub ↗
(ctx context.Context, c *echo.Context)

Source from the content-addressed store, hash-verified

857}
858
859func (s *Service) getUser(ctx context.Context, c *echo.Context) (*store.UserMessage, error) {
860 uid, err := strconv.Atoi(c.Param("userID"))
861 if err != nil {
862 return nil, errors.Errorf("failed to parse user id %v, error %v", c.Param("userID"), err)
863 }
864
865 user, err := s.store.GetUserByID(ctx, uid)
866 if err != nil {
867 return nil, errors.Errorf("failed to get user, error %v", err)
868 }
869 return user, nil
870}
871
872func (s *Service) getGroup(ctx context.Context, c *echo.Context) (*store.GroupMessage, error) {
873 groupName, err := decodeGroupIdentifier(c.Param("groupID"))

Callers 1

Calls 2

ErrorfMethod · 0.80
GetUserByIDMethod · 0.80

Tested by

no test coverage detected