diff options
author | crupest <crupest@outlook.com> | 2021-02-04 21:39:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 21:39:03 +0800 |
commit | 90c74a29bb0bdc6972deb188fa13a8ec5c2870ed (patch) | |
tree | 069d4d2b79896e894fe6dcdfb5188d07eef746dd /BackEnd/Timeline/Controllers | |
parent | d24c5fe825efe88e5067d6386e710ee8a2363562 (diff) | |
parent | f0d9537d664d039b6a2a9024e08de1fef0fc2df6 (diff) | |
download | timeline-90c74a29bb0bdc6972deb188fa13a8ec5c2870ed.tar.gz timeline-90c74a29bb0bdc6972deb188fa13a8ec5c2870ed.tar.bz2 timeline-90c74a29bb0bdc6972deb188fa13a8ec5c2870ed.zip |
Merge pull request #244 from crupest/color
Backend: Color
Diffstat (limited to 'BackEnd/Timeline/Controllers')
-rw-r--r-- | BackEnd/Timeline/Controllers/TimelinePostController.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/BackEnd/Timeline/Controllers/TimelinePostController.cs b/BackEnd/Timeline/Controllers/TimelinePostController.cs index afe9b36f..3f31decf 100644 --- a/BackEnd/Timeline/Controllers/TimelinePostController.cs +++ b/BackEnd/Timeline/Controllers/TimelinePostController.cs @@ -135,6 +135,8 @@ namespace Timeline.Controllers TimelinePostEntity post;
+ TimelinePostCommonProperties properties = new TimelinePostCommonProperties { Color = body.Color, Time = body.Time };
+
if (content.Type == TimelinePostContentTypes.Text)
{
var text = content.Text;
@@ -142,7 +144,7 @@ namespace Timeline.Controllers {
return BadRequest(ErrorResponse.Common.CustomMessage_InvalidModel(Resources.Messages.TimelineController_TextContentTextRequired));
}
- post = await _postService.CreateTextPost(timelineId, userId, text, body.Time);
+ post = await _postService.CreateTextPost(timelineId, userId, text, properties);
}
else if (content.Type == TimelinePostContentTypes.Image)
{
@@ -163,7 +165,7 @@ namespace Timeline.Controllers try
{
- post = await _postService.CreateImagePost(timelineId, userId, data, body.Time);
+ post = await _postService.CreateImagePost(timelineId, userId, data, properties);
}
catch (ImageException)
{
|