Add outline import feature; drop Dto naming, map entities at the API boundary
Services now return entities; endpoints (and the agent toolsets) map to *Response records instead of services building wire DTOs themselves. Also brings in the outline-import agent, MCP tool, ledger and web dialog that were already in progress on disk.
This commit is contained in:
@@ -2,11 +2,5 @@ namespace Novelly.Api.Common;
|
||||
|
||||
public static class ApiResultExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// A missing entity is not exceptional, so lookups return null instead of throwing.
|
||||
/// This is where that null finally becomes an HTTP 404 — the one place the API layer
|
||||
/// needs to know about it.
|
||||
/// </summary>
|
||||
public static IResult ToApiResult<T>(this T? value) where T : class =>
|
||||
value is null ? Results.NotFound() : Results.Ok(value);
|
||||
public static IResult ToApiResult<T>(this T? value) where T : class => value is null ? Results.NotFound() : Results.Ok(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user