Skip to content

Commit

Permalink
Stage
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkrzyz committed Oct 22, 2024
1 parent a847d76 commit ca50f9c
Show file tree
Hide file tree
Showing 23 changed files with 102 additions and 81 deletions.
4 changes: 2 additions & 2 deletions internal/api/graphql/graph/model/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func NewIssueRepository(repo *entity.IssueRepository) IssueRepository {
URL: &repo.Url,
Services: nil,
IssueVariants: nil,
Metadata: getModelMetadata(repo.Metadata),
Metadata: getModelMetadata(repo.BaseIssueRepository.Metadata),
}
}

Expand Down Expand Up @@ -343,7 +343,7 @@ func NewService(s *entity.Service) Service {
return Service{
ID: fmt.Sprintf("%d", s.Id),
Name: &s.Name,
Metadata: getModelMetadata(s.Metadata),
Metadata: getModelMetadata(s.BaseService.Metadata),
}
}

Expand Down
4 changes: 2 additions & 2 deletions internal/app/activity/activity_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (a *activityHandler) CreateActivity(activity *entity.Activity) (*entity.Act
})

var err error
activity.CreatedBy, err = common.GetUserId(a.database, "C1234567")
activity.CreatedBy, err = common.GetUserId(a.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewActivityHandlerError("Internal error while creating activity (GetUserId).")
Expand All @@ -165,7 +165,7 @@ func (a *activityHandler) UpdateActivity(activity *entity.Activity) (*entity.Act
})

var err error
activity.UpdatedBy, err = common.GetUserId(a.database, "C1234567")
activity.UpdatedBy, err = common.GetUserId(a.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewActivityHandlerError("Internal error while updating activity (GetUserId).")
Expand Down
4 changes: 2 additions & 2 deletions internal/app/component/component_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (cs *componentHandler) CreateComponent(component *entity.Component) (*entit
})

var err error
component.CreatedBy, err = common.GetUserId(cs.database, "C1234567")
component.CreatedBy, err = common.GetUserId(cs.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewUserHandlerError("Internal error while creating component (GetUserId).")
Expand Down Expand Up @@ -152,7 +152,7 @@ func (cs *componentHandler) UpdateComponent(component *entity.Component) (*entit
})

var err error
component.UpdatedBy, err = common.GetUserId(cs.database, "C1234567")
component.UpdatedBy, err = common.GetUserId(cs.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewUserHandlerError("Internal error while updating component (GetUserId).")
Expand Down
4 changes: 2 additions & 2 deletions internal/app/component_instance/component_instance_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (ci *componentInstanceHandler) CreateComponentInstance(componentInstance *e
})

var err error
componentInstance.CreatedBy, err = common.GetUserId(ci.database, "C1234567")
componentInstance.CreatedBy, err = common.GetUserId(ci.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewComponentInstanceHandlerError("Internal error while creating componentInstance (GetUserId).")
Expand All @@ -144,7 +144,7 @@ func (ci *componentInstanceHandler) UpdateComponentInstance(componentInstance *e
})

var err error
componentInstance.UpdatedBy, err = common.GetUserId(ci.database, "C7654321")
componentInstance.UpdatedBy, err = common.GetUserId(ci.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewComponentInstanceHandlerError("Internal error while updating componentInstance (GetUserId).")
Expand Down
4 changes: 2 additions & 2 deletions internal/app/component_version/component_version_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (cv *componentVersionHandler) CreateComponentVersion(componentVersion *enti
})

var err error
componentVersion.CreatedBy, err = common.GetUserId(cv.database, "C1234567")
componentVersion.CreatedBy, err = common.GetUserId(cv.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewComponentVersionHandlerError("Internal error while creating componentVersion (GetUserId).")
Expand All @@ -142,7 +142,7 @@ func (cv *componentVersionHandler) UpdateComponentVersion(componentVersion *enti
})

var err error
componentVersion.UpdatedBy, err = common.GetUserId(cv.database, "C7654321")
componentVersion.UpdatedBy, err = common.GetUserId(cv.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewComponentVersionHandlerError("Internal error while updating componentVersion (GetUserId).")
Expand Down
4 changes: 2 additions & 2 deletions internal/app/evidence/evidence_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (e *evidenceHandler) CreateEvidence(evidence *entity.Evidence) (*entity.Evi
})

var err error
evidence.CreatedBy, err = common.GetUserId(e.database, "C1234567")
evidence.CreatedBy, err = common.GetUserId(e.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewEvidenceHandlerError("Internal error while creating evidence (GetUserId).")
Expand All @@ -135,7 +135,7 @@ func (e *evidenceHandler) UpdateEvidence(evidence *entity.Evidence) (*entity.Evi
})

var err error
evidence.UpdatedBy, err = common.GetUserId(e.database, "C7654321")
evidence.UpdatedBy, err = common.GetUserId(e.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewEvidenceHandlerError("Internal error while updating evidence (GetUserId).")
Expand Down
4 changes: 2 additions & 2 deletions internal/app/issue/issue_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (is *issueHandler) CreateIssue(issue *entity.Issue) (*entity.Issue, error)
})

var err error
issue.CreatedBy, err = common.GetUserId(is.database, "C1234567")
issue.CreatedBy, err = common.GetUserId(is.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewIssueHandlerError("Internal error while creating issue (GetUserId).")
Expand Down Expand Up @@ -206,7 +206,7 @@ func (is *issueHandler) UpdateIssue(issue *entity.Issue) (*entity.Issue, error)
})

var err error
issue.UpdatedBy, err = common.GetUserId(is.database, "C7654321")
issue.UpdatedBy, err = common.GetUserId(is.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewIssueHandlerError("Internal error while updating issue (GetUserId).")
Expand Down
4 changes: 2 additions & 2 deletions internal/app/issue_match/issue_match_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (im *issueMatchHandler) CreateIssueMatch(issueMatch *entity.IssueMatch) (*e
})

var err error
issueMatch.CreatedBy, err = common.GetUserId(im.database, "C1234567")
issueMatch.CreatedBy, err = common.GetUserId(im.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewIssueMatchHandlerError("Internal error while retrieving effective severity (GetUserId).")
Expand Down Expand Up @@ -183,7 +183,7 @@ func (im *issueMatchHandler) UpdateIssueMatch(issueMatch *entity.IssueMatch) (*e
})

var err error
issueMatch.UpdatedBy, err = common.GetUserId(im.database, "C7654321")
issueMatch.UpdatedBy, err = common.GetUserId(im.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewIssueMatchHandlerError("Internal error while retrieving effective severity (GetUserId).")
Expand Down
4 changes: 2 additions & 2 deletions internal/app/issue_match_change/issue_match_change_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (imc *issueMatchChangeHandler) CreateIssueMatchChange(issueMatchChange *ent
})

var err error
issueMatchChange.CreatedBy, err = common.GetUserId(imc.database, "C1234567")
issueMatchChange.CreatedBy, err = common.GetUserId(imc.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewIssueMatchChangeHandlerError("Internal error while creating issueMatchChange (GetUserId).")
Expand All @@ -141,7 +141,7 @@ func (imc *issueMatchChangeHandler) UpdateIssueMatchChange(issueMatchChange *ent
})

var err error
issueMatchChange.UpdatedBy, err = common.GetUserId(imc.database, "C7654321")
issueMatchChange.UpdatedBy, err = common.GetUserId(imc.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewIssueMatchChangeHandlerError("Internal error while updating issueMatchChange (GetUserId).")
Expand Down
4 changes: 2 additions & 2 deletions internal/app/issue_repository/issue_repository_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (ir *issueRepositoryHandler) CreateIssueRepository(issueRepository *entity.
})

var err error
issueRepository.CreatedBy, err = common.GetUserId(ir.database, "C1234567")
issueRepository.BaseIssueRepository.CreatedBy, err = common.GetUserId(ir.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewIssueRepositoryHandlerError("Internal error while creating issueRepository (GetUserId).")
Expand Down Expand Up @@ -150,7 +150,7 @@ func (ir *issueRepositoryHandler) UpdateIssueRepository(issueRepository *entity.
})

var err error
issueRepository.UpdatedBy, err = common.GetUserId(ir.database, "C7654321")
issueRepository.BaseIssueRepository.UpdatedBy, err = common.GetUserId(ir.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewIssueRepositoryHandlerError("Internal error while updating issueRepository (GetUserId).")
Expand Down
4 changes: 2 additions & 2 deletions internal/app/issue_variant/issue_variant_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (iv *issueVariantHandler) CreateIssueVariant(issueVariant *entity.IssueVari
})

var err error
issueVariant.CreatedBy, err = common.GetUserId(iv.database, "C1234567")
issueVariant.CreatedBy, err = common.GetUserId(iv.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewIssueVariantHandlerError("Internal error while creating issueVariant (GetUserId).")
Expand Down Expand Up @@ -216,7 +216,7 @@ func (iv *issueVariantHandler) UpdateIssueVariant(issueVariant *entity.IssueVari
})

var err error
issueVariant.UpdatedBy, err = common.GetUserId(iv.database, "C7654321")
issueVariant.UpdatedBy, err = common.GetUserId(iv.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewIssueVariantHandlerError("Internal error while updating issueVariant (GetUserId).")
Expand Down
4 changes: 2 additions & 2 deletions internal/app/service/service_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (s *serviceHandler) CreateService(service *entity.Service) (*entity.Service
})

var err error
service.CreatedBy, err = common.GetUserId(s.database, "C1234567")
service.BaseService.CreatedBy, err = common.GetUserId(s.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewServiceHandlerError("Internal error while creating service (GetUserId).")
Expand Down Expand Up @@ -172,7 +172,7 @@ func (s *serviceHandler) UpdateService(service *entity.Service) (*entity.Service
})

var err error
service.UpdatedBy, err = common.GetUserId(s.database, "C7654321")
service.BaseService.UpdatedBy, err = common.GetUserId(s.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewServiceHandlerError("Internal error while updating service (GetUserId).")
Expand Down
4 changes: 2 additions & 2 deletions internal/app/support_group/support_group_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (sg *supportGroupHandler) CreateSupportGroup(supportGroup *entity.SupportGr
}

var err error
supportGroup.CreatedBy, err = common.GetUserId(sg.database, "C1234567")
supportGroup.CreatedBy, err = common.GetUserId(sg.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewSupportGroupHandlerError("Internal error while creating supportGroup (GetUserId).")
Expand Down Expand Up @@ -181,7 +181,7 @@ func (sg *supportGroupHandler) UpdateSupportGroup(supportGroup *entity.SupportGr
})

var err error
supportGroup.UpdatedBy, err = common.GetUserId(sg.database, "C7654321")
supportGroup.UpdatedBy, err = common.GetUserId(sg.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewSupportGroupHandlerError("Internal error while updating supportGroup (GetUserId).")
Expand Down
4 changes: 2 additions & 2 deletions internal/app/user/user_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (u *userHandler) CreateUser(user *entity.User) (*entity.User, error) {
})

var err error
user.CreatedBy, err = common.GetUserId(u.database, "C1234567")
user.CreatedBy, err = common.GetUserId(u.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewUserHandlerError("Internal error while creating user (GetUserId).")
Expand Down Expand Up @@ -149,7 +149,7 @@ func (u *userHandler) UpdateUser(user *entity.User) (*entity.User, error) {
})

var err error
user.UpdatedBy, err = common.GetUserId(u.database, "C7654321")
user.UpdatedBy, err = common.GetUserId(u.database, "S0000000")
if err != nil {
l.Error(err)
return nil, NewUserHandlerError("Internal error while updating user (GetUserId).")
Expand Down
Loading

0 comments on commit ca50f9c

Please sign in to comment.