force update if the selfhosted process ends midway

This commit is contained in:
kkb0318
2024-04-17 20:58:48 +09:00
parent f7208963ae
commit 78e97f2858
7 changed files with 83 additions and 44 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ package selfhosted
import "context"
func Execute(ctx context.Context, factory OIDCIdPFactory) error {
func Execute(ctx context.Context, factory OIDCIdPFactory, forceUpdate bool) error {
issuerMeta := factory.IssuerMeta()
discovery := factory.IdPDiscovery()
discoveryContents := factory.IdPDiscoveryContents(issuerMeta)
@@ -14,7 +14,7 @@ func Execute(ctx context.Context, factory OIDCIdPFactory) error {
if err != nil {
return err
}
err = discovery.Upload(ctx, discoveryContents)
err = discovery.Upload(ctx, discoveryContents, forceUpdate)
if err != nil {
return err
}