mirror of
https://github.com/TeamPiped/instances-api.git
synced 2025-01-06 01:20:35 +05:30
Merge pull request #45 from Bnyro/imageProxyUrl
include image proxy url and whether registration is disabled
This commit is contained in:
commit
bacc784f59
6
main.go
6
main.go
@ -38,10 +38,14 @@ type Instance struct {
|
|||||||
LastChecked int64 `json:"last_checked"`
|
LastChecked int64 `json:"last_checked"`
|
||||||
Cache bool `json:"cache"`
|
Cache bool `json:"cache"`
|
||||||
S3Enabled bool `json:"s3_enabled"`
|
S3Enabled bool `json:"s3_enabled"`
|
||||||
|
ImageProxyUrl string `json:"image_proxy_url"`
|
||||||
|
RegistrationDisabled bool `json:"registration_disabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type FrontendConfig struct {
|
type FrontendConfig struct {
|
||||||
S3Enabled bool `json:"s3Enabled"`
|
S3Enabled bool `json:"s3Enabled"`
|
||||||
|
ImageProxyUrl string `json:"imageProxy"`
|
||||||
|
RegistrationDisabled bool `json:"registrationDisabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var client = http.Client{
|
var client = http.Client{
|
||||||
@ -192,6 +196,8 @@ func getInstanceDetails(split []string, latest string) (Instance, error) {
|
|||||||
UpToDate: strings.Contains(latest, hash),
|
UpToDate: strings.Contains(latest, hash),
|
||||||
Cache: cacheWorking,
|
Cache: cacheWorking,
|
||||||
S3Enabled: config.S3Enabled,
|
S3Enabled: config.S3Enabled,
|
||||||
|
ImageProxyUrl: config.ImageProxyUrl,
|
||||||
|
RegistrationDisabled: config.RegistrationDisabled,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user