some stauts codes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using Pilz.Extensions.Reflection;
|
||||
using Pilz.Net.Extensions;
|
||||
using System.Diagnostics;
|
||||
using System.Net;
|
||||
|
||||
namespace Pilz.Net.Api.Server;
|
||||
|
||||
@@ -34,6 +35,6 @@ public abstract class BaseItemHandler<TEntity, TUpdateMsg>(IApiServer server)
|
||||
if (UpdateEntity(entity, msg) is ApiResult result)
|
||||
return result;
|
||||
server.Manager.Save(entity, true);
|
||||
return ToClient(entity).ToItemResult();
|
||||
return ToClient(entity).ToItemResult(HttpStatusCode.Created);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user