generated from VLADIMIR/template
up
This commit is contained in:
@@ -70,3 +70,17 @@ func mapApplicationToProtoApplication(application *models.Application) *proto.Ap
|
||||
State: application.State,
|
||||
}
|
||||
}
|
||||
|
||||
func mapProtoApplicationsToApplications(items []*proto.Application) []*models.Application {
|
||||
res := make([]*models.Application, 0, len(items))
|
||||
for _, item := range items {
|
||||
res = append(res, mapProtoApplicationToApplication(item))
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func mapProtoApplicationToApplication(items *proto.Application) *models.Application {
|
||||
return &models.Application{
|
||||
ID: items.Id,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user