mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 09:33:34 -06:00
* Use Wiring to initialize Avatar Cache Server Create AvatarCacheServer Provider function and pass it in as an argument to HTTPServer. Also convert CacheServer to a singleton so that we keep all cached Avatar info in one place for easier access * Refactor avatar cache server and add 'isCustom' check Avatar cache server needs to perform two similar fetches back-to-back; break up functions to allow for easy reuse. Then add handling to see if a user has a custom avatar. * Add additional accessors so that /recents api can easily use the cache * Minor mods to avatar server to facilitiate unit testing * add unit tests for avatar fetching * add error handling in case we somehow fetch gravatars while they are disabled * linting: read error return value in unit test * Use http package status codes Co-authored-by: Ezequiel Victorero <evictorero@gmail.com> * Use http package status codes Co-authored-by: Ezequiel Victorero <evictorero@gmail.com> * Use http package status codes Co-authored-by: Ezequiel Victorero <evictorero@gmail.com> * Incorporate suggestions from PR -avoid mutating arguments -change error handler function to private and make name more descriptive Co-authored-by: Ezequiel Victorero <evictorero@gmail.com> |
||
---|---|---|
.. | ||
acl.go | ||
alerting_test.go | ||
alerting.go | ||
annotations.go | ||
apikey.go | ||
dashboard.go | ||
datasource.go | ||
folder.go | ||
index.go | ||
invite.go | ||
live.go | ||
models_test.go | ||
models.go | ||
org.go | ||
playlist.go | ||
plugins.go | ||
prefs.go | ||
short_url.go | ||
user_token.go | ||
user.go |