(brandID, path string)
| 40 | } |
| 41 | |
| 42 | func (dr *DeviceRepository) assetURL(brandID, path string) string { |
| 43 | if path == "" || dr.config.AssetsBaseURL == "" || strings.HasPrefix(path, dr.config.AssetsBaseURL) { |
| 44 | return path |
| 45 | } |
| 46 | return fmt.Sprintf("%s/vendor/%s/%s", strings.TrimRight(dr.config.AssetsBaseURL, "/"), brandID, path) |
| 47 | } |
| 48 | |
| 49 | // ensureBaseAssetURLs prepends the BaseAssetURL to model assets. |
| 50 | func (dr *DeviceRepository) ensureBaseAssetURLs(models []*ttnpb.EndDeviceModel) { |
no test coverage detected