fix: Pages nil pointer panic and HideExploreUsers config
Some checks are pending
Build and Release / Lint (push) Waiting to run
Build and Release / Unit Tests (push) Waiting to run
Build and Release / Integration Tests (PostgreSQL) (push) Waiting to run
Build and Release / Create Release (push) Waiting to run
Build and Release / Build Binaries (amd64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, linux) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, windows) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, linux) (push) Blocked by required conditions
Some checks are pending
Build and Release / Lint (push) Waiting to run
Build and Release / Unit Tests (push) Waiting to run
Build and Release / Integration Tests (PostgreSQL) (push) Waiting to run
Build and Release / Create Release (push) Waiting to run
Build and Release / Build Binaries (amd64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, linux) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, windows) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, linux) (push) Blocked by required conditions
- Fix GetPagesConfigByRepoID to return ErrPagesConfigNotExist instead of (nil, nil) - Add HideExploreUsers to admin config handler map 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -177,7 +177,7 @@ func GetPagesConfigByRepoID(ctx context.Context, repoID int64) (*PagesConfig, er
|
||||
return nil, err
|
||||
}
|
||||
if !has {
|
||||
return nil, nil // No config means pages not enabled
|
||||
return nil, ErrPagesConfigNotExist{RepoID: repoID}
|
||||
}
|
||||
return config, nil
|
||||
}
|
||||
|
||||
@@ -242,6 +242,7 @@ func ChangeConfig(ctx *context.Context) {
|
||||
cfg.Theme.CustomHomeHTML.DynKey(): marshalString(""),
|
||||
cfg.Theme.APIHeaderURL.DynKey(): marshalString(""),
|
||||
cfg.Theme.HelpURL.DynKey(): marshalString(""),
|
||||
cfg.Theme.HideExploreUsers.DynKey(): marshalBool,
|
||||
cfg.Theme.CustomHomeTitle.DynKey(): marshalString(""),
|
||||
cfg.Theme.CustomHomeTagline.DynKey(): marshalString(""),
|
||||
cfg.Theme.PinnedOrgDisplayFormat.DynKey(): marshalString("condensed"),
|
||||
|
||||
Reference in New Issue
Block a user