aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Controllers/TimelinePostController.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-12 16:42:56 +0800
committercrupest <crupest@outlook.com>2021-02-12 16:42:56 +0800
commite407b645aa7c6738c6f37c69f616c91c99bf1af0 (patch)
tree1133f585e91fd3b8419c24b39ba44bc4042a7709 /BackEnd/Timeline/Controllers/TimelinePostController.cs
parent58595b5c6462add8224904c833adc9eb9d64bb8b (diff)
downloadtimeline-e407b645aa7c6738c6f37c69f616c91c99bf1af0.tar.gz
timeline-e407b645aa7c6738c6f37c69f616c91c99bf1af0.tar.bz2
timeline-e407b645aa7c6738c6f37c69f616c91c99bf1af0.zip
...
Diffstat (limited to 'BackEnd/Timeline/Controllers/TimelinePostController.cs')
-rw-r--r--BackEnd/Timeline/Controllers/TimelinePostController.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Controllers/TimelinePostController.cs b/BackEnd/Timeline/Controllers/TimelinePostController.cs
index 06082f0f..6904e28d 100644
--- a/BackEnd/Timeline/Controllers/TimelinePostController.cs
+++ b/BackEnd/Timeline/Controllers/TimelinePostController.cs
@@ -171,6 +171,10 @@ namespace Timeline.Controllers
for (int i = 0; i < body.DataList.Count; i++)
{
var data = body.DataList[i];
+
+ if (data is null)
+ return BadRequest(new CommonResponse(ErrorCodes.Common.InvalidModel, $"Data at index {i} is null."));
+
try
{
var d = Convert.FromBase64String(data.Data);