generated from VLADIMIR/template
add conclusion
This commit is contained in:
@@ -49,11 +49,26 @@ func mapStory(o *storytelling.Story) *proto.Story {
|
||||
return &proto.Story{
|
||||
Background: o.Background,
|
||||
Introduction: mapIntroduction(o.Introduction),
|
||||
Conclusion: mapConclusion(o.Conclusion),
|
||||
Places: mapPlaces(o.Places),
|
||||
Questions: mapQuestions(o.Questions),
|
||||
}
|
||||
}
|
||||
|
||||
func mapConclusion(o *storytelling.Conclusion) *proto.Conclusion {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return &proto.Conclusion{Text: o.Text, Video: o.Video}
|
||||
}
|
||||
|
||||
func convertConclusion(o *proto.Conclusion) *storytelling.Conclusion {
|
||||
if o == nil || (o.Text == "" && o.Video == "") {
|
||||
return nil
|
||||
}
|
||||
return &storytelling.Conclusion{Text: textFormatter.FormatText(o.Text), Video: o.Video}
|
||||
}
|
||||
|
||||
func mapIntroduction(o *storytelling.Introduction) *proto.Introduction {
|
||||
if o == nil {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user