mirror of
https://github.com/versia-pub/versia-go.git
synced 2026-03-13 04:29:15 +01:00
fix: /api/users/:id shouldn't return remote users
This commit is contained in:
parent
601ecd1124
commit
7d51385ad9
5 changed files with 7 additions and 7 deletions
|
|
@ -19,7 +19,7 @@ type UserService interface {
|
|||
|
||||
NewUser(ctx context.Context, username, password string) (*entity.User, error)
|
||||
|
||||
GetUserByID(ctx context.Context, id uuid.UUID) (*entity.User, error)
|
||||
GetLocalUserByID(ctx context.Context, id uuid.UUID) (*entity.User, error)
|
||||
|
||||
GetWebfingerForUser(ctx context.Context, userID string) (*webfinger.User, error)
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ func (i NoteServiceImpl) CreateNote(ctx context.Context, req api_schema.CreateNo
|
|||
}
|
||||
|
||||
func (i NoteServiceImpl) GetNote(ctx context.Context, id uuid.UUID) (*entity.Note, error) {
|
||||
s := i.telemetry.StartSpan(ctx, "function", "svc_impls/NoteServiceImpl.GetUserByID")
|
||||
s := i.telemetry.StartSpan(ctx, "function", "svc_impls/NoteServiceImpl.GetLocalUserByID")
|
||||
defer s.End()
|
||||
ctx = s.Context()
|
||||
|
||||
|
|
|
|||
|
|
@ -72,12 +72,12 @@ func (i UserServiceImpl) NewUser(ctx context.Context, username, password string)
|
|||
return user, nil
|
||||
}
|
||||
|
||||
func (i UserServiceImpl) GetUserByID(ctx context.Context, id uuid.UUID) (*entity.User, error) {
|
||||
s := i.telemetry.StartSpan(ctx, "function", "svc_impls/UserServiceImpl.GetUserByID")
|
||||
func (i UserServiceImpl) GetLocalUserByID(ctx context.Context, id uuid.UUID) (*entity.User, error) {
|
||||
s := i.telemetry.StartSpan(ctx, "function", "svc_impls/UserServiceImpl.GetLocalUserByID")
|
||||
defer s.End()
|
||||
ctx = s.Context()
|
||||
|
||||
return i.repositories.Users().GetByID(ctx, id)
|
||||
return i.repositories.Users().GetLocalByID(ctx, id)
|
||||
}
|
||||
|
||||
func (i UserServiceImpl) GetWebfingerForUser(ctx context.Context, userID string) (*webfinger.User, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue