mirror of
https://github.com/zitadel/zitadel.git
synced 2025-05-30 15:58:23 +00:00
fix: remove app name check on ChangeAPIApplication (#1561)
* fix: remove app name check on ChangeAPIApplication * fix APIConfigInvalid message
This commit is contained in:
parent
e7913bde59
commit
188938e937
@ -69,7 +69,7 @@ func (c *Commands) addAPIApplication(ctx context.Context, projectAgg *eventstore
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Commands) ChangeAPIApplication(ctx context.Context, apiApp *domain.APIApp, resourceOwner string) (*domain.APIApp, error) {
|
func (c *Commands) ChangeAPIApplication(ctx context.Context, apiApp *domain.APIApp, resourceOwner string) (*domain.APIApp, error) {
|
||||||
if !apiApp.IsValid() || apiApp.AppID == "" || apiApp.AggregateID == "" {
|
if apiApp.AppID == "" || apiApp.AggregateID == "" {
|
||||||
return nil, caos_errs.ThrowInvalidArgument(nil, "COMMAND-1m900", "Errors.Project.App.APIConfigInvalid")
|
return nil, caos_errs.ThrowInvalidArgument(nil, "COMMAND-1m900", "Errors.Project.App.APIConfigInvalid")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,27 +272,6 @@ func TestCommandSide_ChangeAPIApplication(t *testing.T) {
|
|||||||
args args
|
args args
|
||||||
res res
|
res res
|
||||||
}{
|
}{
|
||||||
{
|
|
||||||
name: "invalid app, invalid argument error",
|
|
||||||
fields: fields{
|
|
||||||
eventstore: eventstoreExpect(
|
|
||||||
t,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
args: args{
|
|
||||||
ctx: context.Background(),
|
|
||||||
apiApp: &domain.APIApp{
|
|
||||||
ObjectRoot: models.ObjectRoot{
|
|
||||||
AggregateID: "project1",
|
|
||||||
},
|
|
||||||
AppID: "app1",
|
|
||||||
},
|
|
||||||
resourceOwner: "org1",
|
|
||||||
},
|
|
||||||
res: res{
|
|
||||||
err: caos_errs.IsErrorInvalidArgument,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "missing appid, invalid argument error",
|
name: "missing appid, invalid argument error",
|
||||||
fields: fields{
|
fields: fields{
|
||||||
|
@ -194,7 +194,7 @@ Errors:
|
|||||||
NotActive:: Application is not active
|
NotActive:: Application is not active
|
||||||
NotInactive: Application is not inactive
|
NotInactive: Application is not inactive
|
||||||
OIDCConfigInvalid: OIDC configuration is invalid
|
OIDCConfigInvalid: OIDC configuration is invalid
|
||||||
APIConfigInvalid: OIDC configuration is invalid
|
APIConfigInvalid: API configuration is invalid
|
||||||
IsNotOIDC: Application is not type oidc
|
IsNotOIDC: Application is not type oidc
|
||||||
IsNotAPI: Application is not type API
|
IsNotAPI: Application is not type API
|
||||||
OIDCAuthMethodNoSecret: Chosen OIDC Auth Method does not require a secret
|
OIDCAuthMethodNoSecret: Chosen OIDC Auth Method does not require a secret
|
||||||
|
Loading…
x
Reference in New Issue
Block a user