feat: page-fetcher-api centralised Playwright page fetcher #44

Merged
claude merged 10 commits from feature/page-fetcher-api into main 2026-06-08 15:36:44 +00:00
7 changed files with 9 additions and 9 deletions
Showing only changes of commit e1f171168e - Show all commits
@@ -1,9 +1,9 @@
using Api.Services;
using EmailApi.Models.Requests; using EmailApi.Models.Requests;
using EmailApi.Services;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations; using Swashbuckle.AspNetCore.Annotations;
namespace EmailApi.Controllers; namespace Api.Controllers;
/// <summary> /// <summary>
/// Internal email relay. Accepts an HTML body fragment from trusted callers /// Internal email relay. Accepts an HTML body fragment from trusted callers
+1 -1
View File
@@ -3,7 +3,7 @@ using Email.Data;
using Email.Data.Repositories; using Email.Data.Repositories;
using Email.Data.Repositories.Contracts; using Email.Data.Repositories.Contracts;
using Email.Data.Services; using Email.Data.Services;
using EmailApi.Services; using Api.Services;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using EmailApi.Models.Settings; using EmailApi.Models.Settings;
using Models.Settings; using Models.Settings;
@@ -7,7 +7,7 @@ using MimeKit;
using EmailApi.Models.Settings; using EmailApi.Models.Settings;
using Models.Settings; using Models.Settings;
namespace EmailApi.Services; namespace Api.Services;
/// <summary> /// <summary>
/// Wraps an HTML body fragment in the branded HTML shell and sends the resulting email via SMTP using MailKit. /// Wraps an HTML body fragment in the branded HTML shell and sends the resulting email via SMTP using MailKit.
@@ -1,9 +1,9 @@
using Api.Services;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using PageFetcher.Models; using PageFetcher.Models;
using PageFetcherApi.Services;
using Swashbuckle.AspNetCore.Annotations; using Swashbuckle.AspNetCore.Annotations;
namespace PageFetcherApi.Controllers; namespace Api.Controllers;
/// <summary> /// <summary>
/// Handles page-fetch requests: navigates to the URL via Playwright and returns rendered HTML and extracted text. /// Handles page-fetch requests: navigates to the URL via Playwright and returns rendered HTML and extracted text.
+1 -1
View File
@@ -1,7 +1,7 @@
using System.Reflection; using System.Reflection;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PageFetcher.Data; using PageFetcher.Data;
using PageFetcherApi.Services; using Api.Services;
using PageFetcher.Models.Settings; using PageFetcher.Models.Settings;
using Serilog; using Serilog;
using StartupHelpers; using StartupHelpers;
@@ -8,7 +8,7 @@ using PageFetcher.Data.Entities;
using PageFetcher.Models; using PageFetcher.Models;
using PageFetcher.Models.Settings; using PageFetcher.Models.Settings;
namespace PageFetcherApi.Services; namespace Api.Services;
/// <summary> /// <summary>
/// Fetches a web page via Playwright, extracts plain text, persists the result to the database, /// Fetches a web page via Playwright, extracts plain text, persists the result to the database,
@@ -1,6 +1,6 @@
using Microsoft.Playwright; using Microsoft.Playwright;
namespace PageFetcherApi.Services; namespace Api.Services;
/// <summary> /// <summary>
/// Singleton hosted service that owns the Playwright Chromium browser process for the lifetime of the application. /// Singleton hosted service that owns the Playwright Chromium browser process for the lifetime of the application.