ShortURL: Implement /goto with a sub-resource (#110972)

This commit is contained in:
Ryan McKinley
2025-09-15 16:56:20 +03:00
committed by GitHub
parent 2df39fc71a
commit a5bd313f5a
12 changed files with 319 additions and 98 deletions
+6 -8
View File
@@ -28,8 +28,8 @@ var (
type ShortURLAppInstaller struct {
appsdkapiserver.AppInstaller
cfg *setting.Cfg
service shorturls.Service
service shorturls.Service
namespacer request.NamespaceMapper
}
func RegisterAppInstaller(
@@ -37,12 +37,10 @@ func RegisterAppInstaller(
service shorturls.Service,
) (*ShortURLAppInstaller, error) {
installer := &ShortURLAppInstaller{
cfg: cfg,
service: service,
service: service,
namespacer: request.GetNamespaceMapper(cfg),
}
specificConfig := any(&shorturlapp.ShortURLConfig{
AppURL: cfg.AppURL,
})
specificConfig := any(&shorturlapp.ShortURLConfig{})
provider := simple.NewAppProvider(apis.LocalManifest(), specificConfig, shorturlapp.New)
appCfg := app.Config{
@@ -69,7 +67,7 @@ func (s *ShortURLAppInstaller) GetLegacyStorage(requested schema.GroupVersionRes
}
legacyStore := &legacyStorage{
service: s.service,
namespacer: request.GetNamespaceMapper(s.cfg),
namespacer: s.namespacer,
}
legacyStore.tableConverter = utils.NewTableConverter(
gvr.GroupResource(),