Sync reason System.Reflection.MethodBase.GetCurrentMethod()?.Name

This commit is contained in:
2025-09-18 02:28:59 +02:00
parent 95a75bfbcb
commit e4263e4b2b
20 changed files with 40 additions and 39 deletions

View File

@@ -91,7 +91,7 @@ public class MetadataFetcherController(MangaContext context) : Controller
MetadataEntry entry = fetcher.CreateMetadataEntry(manga, Identifier);
context.MetadataEntries.Add(entry);
if(await context.Sync(HttpContext.RequestAborted, GetType()) is { success: false } result)
if(await context.Sync(HttpContext.RequestAborted, GetType(), System.Reflection.MethodBase.GetCurrentMethod()?.Name) is { success: false } result)
return TypedResults.InternalServerError(result.exceptionMessage);
return TypedResults.Ok(entry);
}
@@ -122,7 +122,7 @@ public class MetadataFetcherController(MangaContext context) : Controller
context.Remove(entry);
if(await context.Sync(HttpContext.RequestAborted, GetType()) is { success: false } result)
if(await context.Sync(HttpContext.RequestAborted, GetType(), System.Reflection.MethodBase.GetCurrentMethod()?.Name) is { success: false } result)
return TypedResults.InternalServerError(result.exceptionMessage);
return TypedResults.Ok();
}