28 lines
734 B
Go
28 lines
734 B
Go
package user
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/SamuelTariku/FortuneBet-Backend/internal/domain"
|
|
)
|
|
|
|
func (s *Service) SearchUserByNameOrPhone(ctx context.Context, searchString string) ([]domain.User, error) {
|
|
// Search user
|
|
return s.userStore.SearchUserByNameOrPhone(ctx, searchString)
|
|
|
|
}
|
|
func (s *Service) UpdateUser(ctx context.Context, user domain.UpdateUserReq) error {
|
|
// update user
|
|
return s.userStore.UpdateUser(ctx, user)
|
|
|
|
}
|
|
|
|
func (s *Service) UpdateUserCompany(ctx context.Context, id int64, companyID int64) error {
|
|
// update user
|
|
return s.userStore.UpdateUserCompany(ctx, id, companyID)
|
|
|
|
}
|
|
func (s *Service) GetUserByID(ctx context.Context, id int64) (domain.User, error) {
|
|
return s.userStore.GetUserByID(ctx, id)
|
|
}
|