mirror of
https://github.com/jez500/pricebuddy.git
synced 2026-11-24 19:58:13 +01:00
Port the stateless POST /api/meta-extraction endpoint from the dev branch onto current main. Extracts title/price/image from a product URL without persisting anything, auto-matching a store by domain and accepting an optional store override to test custom scrape strategies. The service is reimplemented against main's current ScrapeUrl/Store APIs (uses the existing domainFilter scope rather than dev's findByDomain helper chain) so it stays decoupled from dev's competing scraper refactor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
14 lines
424 B
PHP
14 lines
424 B
PHP
<?php
|
|
|
|
use App\Http\Controllers\Api\MetaExtractionController;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::get('/user', function (Request $request) {
|
|
return $request->user()->only(['id', 'name', 'email']);
|
|
})->middleware('auth:sanctum')->name('api.user');
|
|
|
|
Route::post('/meta-extraction', MetaExtractionController::class)
|
|
->middleware('auth:sanctum')
|
|
->name('api.meta-extraction');
|