aboutsummaryrefslogtreecommitdiff
path: root/Timeline
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-31 22:39:18 +0800
committercrupest <crupest@outlook.com>2020-08-31 22:39:18 +0800
commit7e414fb4a09e6d35fa32d48fdba38a537ffe1d23 (patch)
tree187696f3303241177820ca65fa441655a03de257 /Timeline
parent4dda5d088330e76844010a4f89049ea207652318 (diff)
downloadtimeline-7e414fb4a09e6d35fa32d48fdba38a537ffe1d23.tar.gz
timeline-7e414fb4a09e6d35fa32d48fdba38a537ffe1d23.tar.bz2
timeline-7e414fb4a09e6d35fa32d48fdba38a537ffe1d23.zip
Post info now contain data etag.
Diffstat (limited to 'Timeline')
-rw-r--r--Timeline/Models/Http/Timeline.cs7
-rw-r--r--Timeline/Models/Timeline.cs4
2 files changed, 10 insertions, 1 deletions
diff --git a/Timeline/Models/Http/Timeline.cs b/Timeline/Models/Http/Timeline.cs
index 3596af18..a81b33f5 100644
--- a/Timeline/Models/Http/Timeline.cs
+++ b/Timeline/Models/Http/Timeline.cs
@@ -25,6 +25,10 @@ namespace Timeline.Models.Http
/// If post is of image type. This is the image url.
/// </summary>
public string? Url { get; set; }
+ /// <summary>
+ /// If post has data (currently it means it's a image post), this is the data etag.
+ /// </summary>
+ public string? ETag { get; set; }
}
/// <summary>
@@ -192,7 +196,8 @@ namespace Timeline.Models.Http
Url = urlHelper.ActionLink(
action: nameof(TimelineController.PostDataGet),
controller: nameof(TimelineController)[0..^nameof(Controller).Length],
- values: new { Name = source.TimelineName, Id = source.Id })
+ values: new { Name = source.TimelineName, Id = source.Id }),
+ ETag = $"\"{imageContent.DataTag}\""
};
}
else
diff --git a/Timeline/Models/Timeline.cs b/Timeline/Models/Timeline.cs
index 42906053..a5987577 100644
--- a/Timeline/Models/Timeline.cs
+++ b/Timeline/Models/Timeline.cs
@@ -43,6 +43,10 @@ namespace Timeline.Models
public ImageTimelinePostContent(string dataTag) { DataTag = dataTag; }
public string Type { get; } = TimelinePostContentTypes.Image;
+
+ /// <summary>
+ /// The tag of the data. The tag of the entry in DataManager. Also the etag (not quoted).
+ /// </summary>
public string DataTag { get; set; }
}