fix: query side (#257)

* fix: project by id return projectview

* fix: return always view model on query side

* fix: return always view model on query side
This commit is contained in:
Fabi
2020-06-23 07:06:07 +02:00
committed by GitHub
parent 6556d053b2
commit 1de574df42
15 changed files with 3621 additions and 3438 deletions

View File

@@ -34,14 +34,14 @@ func orgFromModel(org *org_model.Org) *Org {
}
}
func orgFromView(org *org_model.OrgView) *Org {
func orgViewFromModel(org *org_model.OrgView) *OrgView {
creationDate, err := ptypes.TimestampProto(org.CreationDate)
logging.Log("GRPC-GTHsZ").OnError(err).Debug("unable to get timestamp from time")
changeDate, err := ptypes.TimestampProto(org.ChangeDate)
logging.Log("GRPC-dVnoj").OnError(err).Debug("unable to get timestamp from time")
return &Org{
return &OrgView{
ChangeDate: changeDate,
CreationDate: creationDate,
Id: org.ID,