some stauts codes

This commit is contained in:
Pilzinsel64
2025-04-02 09:50:13 +02:00
parent 7a5db49cfb
commit b60f8541f2
3 changed files with 17 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
using Pilz.Extensions.Reflection;
using Pilz.Net.Extensions;
using System.Diagnostics;
using System.Net;
namespace Pilz.Net.Api.Server;
@@ -45,7 +46,7 @@ public abstract class BaseChildItemHandler<TEntity, TParent, TUpdateMsg>(IApiSer
return result;
GetChilds(parentEntity).Add(entity);
server.Manager.Save(parentEntity, true);
return ToClient(entity).ToItemResult();
return ToClient(entity).ToItemResult(HttpStatusCode.Created);
}
public abstract IList<TEntity> GetChilds(TParent parent);