Add License
This commit is contained in:
@@ -61,8 +61,8 @@ func (s *LicenseService) GetByID(ctx context.Context, id string) (*entity.Licens
|
||||
return licenseDB.ToLicense(), nil
|
||||
}
|
||||
|
||||
func (s *LicenseService) GetAll(ctx context.Context, limit, offset int) ([]*entity.License, int64, error) {
|
||||
licenses, total, err := s.repo.GetAll(ctx, limit, offset)
|
||||
func (s *LicenseService) GetAll(ctx context.Context, limit, offset int, status string) ([]*entity.License, int64, error) {
|
||||
licenses, total, err := s.repo.GetAll(ctx, limit, offset, status)
|
||||
if err != nil {
|
||||
logger.ContextLogger(ctx).Error("error when getting all licenses", zap.Error(err))
|
||||
return nil, 0, err
|
||||
|
||||
@@ -134,5 +134,5 @@ type License interface {
|
||||
Create(ctx mycontext.Context, licenseReq *entity.License) (*entity.License, error)
|
||||
Update(ctx mycontext.Context, id string, licenseReq *entity.License) (*entity.License, error)
|
||||
GetByID(ctx context.Context, id string) (*entity.License, error)
|
||||
GetAll(ctx context.Context, limit, offset int) ([]*entity.License, int64, error)
|
||||
GetAll(ctx context.Context, limit, offset int, status string) ([]*entity.License, int64, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user