Add backend unit tests

This commit is contained in:
Jamie Curnow
2023-07-25 11:59:02 +10:00
parent 72b071dbaa
commit b123ca4fd0
17 changed files with 399 additions and 283 deletions

View File

@ -22,3 +22,12 @@ func Expansion(next http.Handler) http.Handler {
}
})
}
// GetExpandFromContext returns the Expansion setting
func GetExpandFromContext(r *http.Request) []string {
expand, ok := r.Context().Value(c.ExpansionCtxKey).([]string)
if !ok {
return nil
}
return expand
}