fix(discovery): stop auto-firing research on Accept
Accepting a row triggered a background POST to /admin/markets/<edition>/research. The intent was to "warm up" the edit page, but the result was discarded (fire-and-forget), the edit page only renders research from its own form action, and the backend's 5-minute-per-market cooldown still got set — so the operator's first manual "Mit KI recherchieren" click hit "Bitte warte 5 Minuten zwischen Recherche-Aufrufen" instead. Removes the auto-fire. Research runs on user click. If we want prefetched suggestions later, that needs server-side caching + a load-time fetch, not fire-and-forget.
This commit is contained in:
@@ -160,13 +160,6 @@ export const actions: Actions = {
|
||||
cookies,
|
||||
{ method: 'POST', fetch }
|
||||
);
|
||||
// Fire research asynchronously — don't await, the edit page handles streaming suggestions.
|
||||
void serverFetch(`/admin/markets/${res.data.edition_id}/research`, cookies, {
|
||||
method: 'POST',
|
||||
fetch
|
||||
}).catch(() => {
|
||||
// Silent: the edit page shows a toast if research hasn't completed.
|
||||
});
|
||||
redirect(303, `/admin/maerkte/${res.data.edition_id}/bearbeiten`);
|
||||
} catch (err) {
|
||||
if (err instanceof Response || (err as { status?: number })?.status === 303) throw err;
|
||||
|
||||
Reference in New Issue
Block a user