Show data sources and the central bank list in Settings (refs #22)

A "Dati" section lists every external source with its state, last answer
and the reason it is off (Alpaca without the paper keys, FRED and Finnhub
without theirs), links the 30-day quality report, and edits the Fed/ECB
meeting list; a list that does not parse is refused with an example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-10 15:45:06 +01:00
1 parent 1e71038209
commit 4a65d4060f
4 files changed
+99 -2

No files matched your search

+6 -1
View File
@@ -151,11 +151,16 @@ internal static partial class Forms
private static async Task<IResult> SetSettingAsync(string key, IFormCollection form, AnubisHost host, HttpContext context, CancellationToken ct)
{
var back = Back(form, "/impostazioni");
if (key != SettingsStore.Theme.Key && key != SettingsStore.Currency.Key)
if (key != SettingsStore.Theme.Key && key != SettingsStore.Currency.Key && key != SettingsStore.CentralBankMeetings.Key)
{
return Results.Redirect(With(back, "errore", "impostazione"));
}
if (key == SettingsStore.CentralBankMeetings.Key && Anubis.Data.CentralBanks.Check(form["valore"].ToString()) is not null)
{
return Results.Redirect(With(back, "errore", "riunioni"));
}
var result = await Endpoints.SetSettingAsync(host, key, form["valore"].ToString(), context, ct).ConfigureAwait(false);
return Results.Redirect(result is IStatusCodeHttpResult { StatusCode: StatusCodes.Status204NoContent } ? back : With(back, "errore", "impostazione"));
}