sync code
This commit is contained in:
@@ -3,7 +3,6 @@ using Blahblah.FlowerStory.Server.Data.Model;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
|
||||
namespace Blahblah.FlowerStory.Server.Controller;
|
||||
|
||||
@@ -294,7 +293,7 @@ public class EventApiController : BaseController
|
||||
var record = database.Records.SingleOrDefault(r => r.Id == update.Id && r.OwnerId == user.Id);
|
||||
if (record == null)
|
||||
{
|
||||
return NotFound(update.Id);
|
||||
return NotFound($"Event id {update.Id} not found");
|
||||
}
|
||||
record.FlowerId = update.FlowerId;
|
||||
record.EventId = update.EventId;
|
||||
@@ -365,7 +364,7 @@ public class EventApiController : BaseController
|
||||
var record = database.Records.SingleOrDefault(r => r.Id == id && r.OwnerId == user.Id);
|
||||
if (record == null)
|
||||
{
|
||||
return NotFound(id);
|
||||
return NotFound($"Record id {id} not found");
|
||||
}
|
||||
if (photo.Length > 0)
|
||||
{
|
||||
@@ -458,7 +457,7 @@ public class EventApiController : BaseController
|
||||
var record = database.Records.SingleOrDefault(r => r.Id == id && r.OwnerId == user.Id);
|
||||
if (record == null)
|
||||
{
|
||||
return NotFound(id);
|
||||
return NotFound($"Record id {id} not found");
|
||||
}
|
||||
|
||||
SaveDatabase();
|
||||
|
Reference in New Issue
Block a user