diff options
author | crupest <crupest@outlook.com> | 2021-02-12 16:42:56 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-02-12 16:42:56 +0800 |
commit | 3b60ec8b8fe13710f954338c27ed98b46e1ed1fd (patch) | |
tree | 3570e9b0bb536e1997e0d8606b656d2d20abfb26 /BackEnd/Timeline | |
parent | d30c011d70453029a7a5c27b00f7f33357c3a9c2 (diff) | |
download | timeline-3b60ec8b8fe13710f954338c27ed98b46e1ed1fd.tar.gz timeline-3b60ec8b8fe13710f954338c27ed98b46e1ed1fd.tar.bz2 timeline-3b60ec8b8fe13710f954338c27ed98b46e1ed1fd.zip |
...
Diffstat (limited to 'BackEnd/Timeline')
-rw-r--r-- | BackEnd/Timeline/Controllers/TimelinePostController.cs | 4 |
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);
|