Chore: Remove public vars in setting package (#81018)
Removes the public variable setting.SecretKey plus some other ones. Introduces some new functions for creating setting.Cfg.
This commit is contained in:
@@ -84,7 +84,7 @@ func (api *AnonDeviceServiceAPI) ListDevices(c *contextmodel.ReqContext) respons
|
||||
resDevices = append(resDevices, &deviceDTO{
|
||||
Device: *device,
|
||||
LastSeenAt: util.GetAgeString(device.UpdatedAt),
|
||||
AvatarUrl: dtos.GetGravatarUrl(device.DeviceID),
|
||||
AvatarUrl: dtos.GetGravatarUrl(api.cfg, device.DeviceID),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ func (a *AnonDeviceService) tagDeviceUI(ctx context.Context, httpReq *http.Reque
|
||||
|
||||
a.localCache.SetDefault(key, struct{}{})
|
||||
|
||||
if setting.Env == setting.Dev {
|
||||
if a.cfg.Env == setting.Dev {
|
||||
a.log.Debug("Tagging device for UI", "deviceID", device.DeviceID, "device", device, "key", key)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user