Skip to content

Commit

Permalink
chore: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Larvan2 committed Sep 24, 2023
1 parent 89d9cb0 commit e6366f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) {
GeoIp: "https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat",
GeoSite: "https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat",
},
ExternalUIURL: "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip",
}

if err := yaml.Unmarshal(buf, rawCfg); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions config/update_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (
ExternalUIName string
)
var (
ErrImcompleteConf = errors.New("ExternalUI configure incomplete")
ErrIncompleteConf = errors.New("ExternalUI configure incomplete")
)
var xdMutex sync.Mutex

Expand Down Expand Up @@ -66,7 +66,7 @@ func UpdateUI() error {

func prepare() error {
if ExternalUIPath == "" || ExternalUIURL == "" {
return ErrImcompleteConf
return ErrIncompleteConf
}

if ExternalUIName != "" {
Expand Down
2 changes: 1 addition & 1 deletion hub/route/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func upgradeCore(w http.ResponseWriter, r *http.Request) {
func updateUI(w http.ResponseWriter, r *http.Request) {
err := config.UpdateUI()
if err != nil {
if errors.Is(err, config.ErrImcompleteConf) {
if errors.Is(err, config.ErrIncompleteConf) {
log.Warnln("%s", err)
render.Status(r, http.StatusNotImplemented)
render.JSON(w, r, newError(fmt.Sprintf("%s", err)))
Expand Down

0 comments on commit e6366f7

Please sign in to comment.