@@ -51,7 +51,7 @@ public ViewModelToDomainMappingProfile()
5151 CreateMap < SaveUserRoleViewModel , SaveUserRoleCommand > ( ) . ConstructUsing ( c => new SaveUserRoleCommand ( c . Username , c . Role ) ) ;
5252 CreateMap < RemoveUserLoginViewModel , RemoveUserLoginCommand > ( ) . ConstructUsing ( c => new RemoveUserLoginCommand ( c . Username , c . LoginProvider , c . ProviderKey ) ) ;
5353 CreateMap < AdminChangePasswordViewodel , AdminChangePasswordCommand > ( ) . ConstructUsing ( c => new AdminChangePasswordCommand ( c . Password , c . ConfirmPassword , c . Username ) ) ;
54-
54+
5555 /*
5656 * Client commands
5757 */
@@ -65,19 +65,19 @@ public ViewModelToDomainMappingProfile()
6565 CreateMap < RemoveClientViewModel , RemoveClientCommand > ( ) . ConstructUsing ( c => new RemoveClientCommand ( c . ClientId ) ) ;
6666 CreateMap < CopyClientViewModel , CopyClientCommand > ( ) . ConstructUsing ( c => new CopyClientCommand ( c . ClientId ) ) ;
6767 CreateMap < SaveClientViewModel , SaveClientCommand > ( ) . ConstructUsing ( c => new SaveClientCommand ( c . ClientId , c . ClientName , c . ClientUri , c . LogoUri , c . Description , c . ClientType ) ) ;
68-
68+
6969 /*
7070 * Identity Resource commands
7171 */
7272 CreateMap < IdentityResource , RegisterIdentityResourceCommand > ( ) . ConstructUsing ( c => new RegisterIdentityResourceCommand ( c ) ) ;
73- CreateMap < IdentityResourceViewModel , UpdateIdentityResourceCommand > ( ) . ConstructUsing ( c => new UpdateIdentityResourceCommand ( c , c . OldName ) ) ;
73+ CreateMap < IdentityResourceViewModel , UpdateIdentityResourceCommand > ( ) . ConstructUsing ( c => new UpdateIdentityResourceCommand ( c , c . OldName ) ) ;
7474 CreateMap < RemoveIdentityResourceViewModel , RemoveIdentityResourceCommand > ( ) . ConstructUsing ( c => new RemoveIdentityResourceCommand ( c . Name ) ) ;
7575
7676 /*
7777 * Api Resource commands
7878 */
7979 CreateMap < ApiResource , RegisterApiResourceCommand > ( ) . ConstructUsing ( c => new RegisterApiResourceCommand ( c ) ) ;
80- CreateMap < ApiResource , UpdateApiResourceCommand > ( ) . ConstructUsing ( c => new UpdateApiResourceCommand ( c ) ) ;
80+ CreateMap < UpdateApiResourceViewModel , UpdateApiResourceCommand > ( ) . ConstructUsing ( c => new UpdateApiResourceCommand ( c , c . OldApiResourceId ) ) ;
8181 CreateMap < RemoveApiResourceViewModel , RemoveApiResourceCommand > ( ) . ConstructUsing ( c => new RemoveApiResourceCommand ( c . Name ) ) ;
8282
8383 CreateMap < SaveApiSecretViewModel , SaveApiSecretCommand > ( ) . ConstructUsing ( c => new SaveApiSecretCommand ( c . ResourceName , c . Description , c . Value , c . Type , c . Expiration , ( int ) c . Hash . GetValueOrDefault ( HashType . Sha256 ) ) ) ;
0 commit comments