Cleanup outlook endpoints and completed roadmap documentation
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful

This commit is contained in:
2026-06-12 09:40:49 -05:00
parent 6316783c3a
commit f4dd701204
11 changed files with 43 additions and 429 deletions

View File

@@ -18,7 +18,6 @@ type outlookFilterMode int
const (
outlookFilterUser outlookFilterMode = iota
outlookFilterActive
outlookFilterLocation
)
var outlookNow = time.Now
@@ -27,7 +26,6 @@ func outlookDefinitions(svc Service) []endpoint.Definition {
return []endpoint.Definition{
outlookDefinition("/outlooks/convective", outlookFilterUser, bindOutlookQuery, svc),
outlookDefinition("/outlooks/convective/active", outlookFilterActive, bindOutlookQuery, svc),
outlookDefinition("/outlooks/convective/location", outlookFilterLocation, bindOutlookLocationQuery, svc),
}
}
@@ -42,14 +40,10 @@ func outlookDefinition(
binder,
func(ctx context.Context, req outlookQueryRequest) (any, error) {
filter := req.Filter
if mode == outlookFilterActive || mode == outlookFilterLocation {
if mode == outlookFilterActive {
activeAt := outlookNow().UTC()
filter.ActiveAt = &activeAt
}
if mode == outlookFilterLocation {
containsLocation := true
filter.ContainsLocation = &containsLocation
}
run, err := svc.LatestConvectiveOutlook(ctx, filter)
if err != nil {