From 159e48374f1a03c8f7ef6d2b416dc4bc74f74306 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Wed, 20 Oct 2021 16:07:20 +0800 Subject: [PATCH] Move IProfileAppService to account module --- .../Volo/Abp/Account}/ChangePasswordInput.cs | 3 +- .../Volo/Abp/Account}/IProfileAppService.cs | 3 +- .../Volo/Abp/Account}/ProfileDto.cs | 2 +- .../Volo/Abp/Account}/UpdateProfileDto.cs | 7 +- .../Account/AbpAccountApplicationModule.cs | 8 +- ...countApplicationModuleAutoMapperProfile.cs | 16 +++ .../Volo/Abp/Account}/ProfileAppService.cs | 5 +- .../ProfileClientProxy.Generated.cs | 2 +- .../ClientProxies/ProfileClientProxy.cs | 2 +- .../ClientProxies/account-generate-proxy.json | 103 +++++++++++++++++- .../Volo/Abp/Account}/ProfileController.cs | 9 +- .../AbpAccountWebModule.cs | 1 + .../Password/Default.js | 2 +- .../PersonalInfo/Default.js | 2 +- .../wwwroot/client-proxies/account-proxy.js | 32 ++++++ ...ntityApplicationModuleAutoMapperProfile.cs | 6 - .../identity-generate-proxy.json | 103 +----------------- .../wwwroot/client-proxies/identity-proxy.js | 32 ------ 18 files changed, 179 insertions(+), 159 deletions(-) rename modules/{identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity => account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account}/ChangePasswordInput.cs (91%) rename modules/{identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity => account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account}/IProfileAppService.cs (85%) rename modules/{identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity => account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account}/ProfileDto.cs (94%) rename modules/{identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity => account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account}/UpdateProfileDto.cs (89%) create mode 100644 modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModuleAutoMapperProfile.cs rename modules/{identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity => account/src/Volo.Abp.Account.Application/Volo/Abp/Account}/ProfileAppService.cs (97%) rename modules/{identity/src/Volo.Abp.Identity.HttpApi.Client => account/src/Volo.Abp.Account.HttpApi.Client}/ClientProxies/ProfileClientProxy.Generated.cs (96%) rename modules/{identity/src/Volo.Abp.Identity.HttpApi.Client => account/src/Volo.Abp.Account.HttpApi.Client}/ClientProxies/ProfileClientProxy.cs (80%) rename modules/{identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity => account/src/Volo.Abp.Account.HttpApi/Volo/Abp/Account}/ProfileController.cs (83%) diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/ChangePasswordInput.cs b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/ChangePasswordInput.cs similarity index 91% rename from modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/ChangePasswordInput.cs rename to modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/ChangePasswordInput.cs index 04f7879f15..d790d7e0f1 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/ChangePasswordInput.cs +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/ChangePasswordInput.cs @@ -1,8 +1,9 @@ using System.ComponentModel.DataAnnotations; using Volo.Abp.Auditing; +using Volo.Abp.Identity; using Volo.Abp.Validation; -namespace Volo.Abp.Identity +namespace Volo.Abp.Account { public class ChangePasswordInput { diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IProfileAppService.cs b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/IProfileAppService.cs similarity index 85% rename from modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IProfileAppService.cs rename to modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/IProfileAppService.cs index 15d20e551e..6272ce11e0 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IProfileAppService.cs +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/IProfileAppService.cs @@ -1,7 +1,8 @@ using System.Threading.Tasks; using Volo.Abp.Application.Services; +using Volo.Abp.Identity; -namespace Volo.Abp.Identity +namespace Volo.Abp.Account { public interface IProfileAppService : IApplicationService { diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/ProfileDto.cs b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/ProfileDto.cs similarity index 94% rename from modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/ProfileDto.cs rename to modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/ProfileDto.cs index 659954ae8a..fa987f0def 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/ProfileDto.cs +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/ProfileDto.cs @@ -1,7 +1,7 @@ using Volo.Abp.Domain.Entities; using Volo.Abp.ObjectExtending; -namespace Volo.Abp.Identity +namespace Volo.Abp.Account { public class ProfileDto : ExtensibleObject, IHasConcurrencyStamp { diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/UpdateProfileDto.cs b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/UpdateProfileDto.cs similarity index 89% rename from modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/UpdateProfileDto.cs rename to modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/UpdateProfileDto.cs index 9ebf54ba5e..5eafc8cf98 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/UpdateProfileDto.cs +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/UpdateProfileDto.cs @@ -1,9 +1,8 @@ -using System.ComponentModel.DataAnnotations; -using Volo.Abp.Domain.Entities; +using Volo.Abp.Identity; using Volo.Abp.ObjectExtending; using Volo.Abp.Validation; -namespace Volo.Abp.Identity +namespace Volo.Abp.Account { public class UpdateProfileDto : ExtensibleObject { @@ -24,4 +23,4 @@ namespace Volo.Abp.Identity public string ConcurrencyStamp { get; set; } } -} \ No newline at end of file +} diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModule.cs b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModule.cs index 2130c52a12..418b88ddb2 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModule.cs +++ b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModule.cs @@ -1,4 +1,5 @@ -using Volo.Abp.Emailing; +using Volo.Abp.AutoMapper; +using Volo.Abp.Emailing; using Volo.Abp.Identity; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; @@ -22,6 +23,11 @@ namespace Volo.Abp.Account options.FileSets.AddEmbedded(); }); + Configure(options => + { + options.AddProfile(validate: true); + }); + Configure(options => { options.Applications["MVC"].Urls[AccountUrlNames.PasswordReset] = "Account/ResetPassword"; diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModuleAutoMapperProfile.cs b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModuleAutoMapperProfile.cs new file mode 100644 index 0000000000..604b7ab89c --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModuleAutoMapperProfile.cs @@ -0,0 +1,16 @@ +using AutoMapper; +using Volo.Abp.Identity; + +namespace Volo.Abp.Account +{ + public class AbpAccountApplicationModuleAutoMapperProfile : Profile + { + public AbpAccountApplicationModuleAutoMapperProfile() + { + CreateMap() + .ForMember(dest => dest.HasPassword, + op => op.MapFrom(src => src.PasswordHash != null)) + .MapExtraProperties(); + } + } +} diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/ProfileAppService.cs similarity index 97% rename from modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs rename to modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/ProfileAppService.cs index c722a43904..89e5bd74da 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs +++ b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/ProfileAppService.cs @@ -1,16 +1,17 @@ using System; -using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Options; using Volo.Abp.Data; +using Volo.Abp.Identity; using Volo.Abp.Identity.Settings; +using Volo.Abp.Settings; using Volo.Abp.ObjectExtending; using Volo.Abp.Settings; using Volo.Abp.Users; -namespace Volo.Abp.Identity +namespace Volo.Abp.Account { [Authorize] public class ProfileAppService : IdentityAppServiceBase, IProfileAppService diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs similarity index 96% rename from modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs rename to modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs index aac071ecb2..794c5a3557 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs @@ -9,7 +9,7 @@ using Volo.Abp.Http.Client.ClientProxying; using Volo.Abp.Identity; // ReSharper disable once CheckNamespace -namespace Volo.Abp.Identity.ClientProxies +namespace Volo.Abp.Account.ClientProxies { [Dependency(ReplaceServices = true)] [ExposeServices(typeof(IProfileAppService), typeof(ProfileClientProxy))] diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.cs b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/ProfileClientProxy.cs similarity index 80% rename from modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.cs rename to modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/ProfileClientProxy.cs index ccf808ca06..32232daffb 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.cs +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/ProfileClientProxy.cs @@ -1,6 +1,6 @@ // This file is part of ProfileClientProxy, you can customize it here // ReSharper disable once CheckNamespace -namespace Volo.Abp.Identity.ClientProxies +namespace Volo.Abp.Account.ClientProxies { public partial class ProfileClientProxy { diff --git a/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/account-generate-proxy.json b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/account-generate-proxy.json index f6d97dbc59..c6152dbd74 100644 --- a/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/account-generate-proxy.json +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/account-generate-proxy.json @@ -223,9 +223,110 @@ "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" } } + }, + "Volo.Abp.Account.ProfileController": { + "controllerName": "Profile", + "controllerGroupName": "Profile", + "type": "Volo.Abp.Account.ProfileController", + "interfaces": [ + { + "type": "Volo.Abp.Account.IProfileAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/account/my-profile", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Account.ProfileDto", + "typeSimple": "Volo.Abp.Account.ProfileDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IProfileAppService" + }, + "UpdateAsyncByInput": { + "uniqueName": "UpdateAsyncByInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/account/my-profile", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Account.UpdateProfileDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.UpdateProfileDto", + "typeSimple": "Volo.Abp.Account.UpdateProfileDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.UpdateProfileDto", + "typeSimple": "Volo.Abp.Account.UpdateProfileDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Account.ProfileDto", + "typeSimple": "Volo.Abp.Account.ProfileDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IProfileAppService" + }, + "ChangePasswordAsyncByInput": { + "uniqueName": "ChangePasswordAsyncByInput", + "name": "ChangePasswordAsync", + "httpMethod": "POST", + "url": "api/account/my-profile/change-password", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Account.ChangePasswordInput, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.ChangePasswordInput", + "typeSimple": "Volo.Abp.Account.ChangePasswordInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.ChangePasswordInput", + "typeSimple": "Volo.Abp.Account.ChangePasswordInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IProfileAppService" + } + } } } } }, "types": {} -} \ No newline at end of file +} diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/ProfileController.cs b/modules/account/src/Volo.Abp.Account.HttpApi/Volo/Abp/Account/ProfileController.cs similarity index 83% rename from modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/ProfileController.cs rename to modules/account/src/Volo.Abp.Account.HttpApi/Volo/Abp/Account/ProfileController.cs index f16c780d93..73bdba4489 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/ProfileController.cs +++ b/modules/account/src/Volo.Abp.Account.HttpApi/Volo/Abp/Account/ProfileController.cs @@ -1,13 +1,14 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Identity; -namespace Volo.Abp.Identity +namespace Volo.Abp.Account { - [RemoteService(Name = IdentityRemoteServiceConsts.RemoteServiceName)] - [Area("identity")] + [RemoteService(Name = AccountRemoteServiceConsts.RemoteServiceName)] + [Area("account")] [ControllerName("Profile")] - [Route("/api/identity/my-profile")] + [Route("/api/account/my-profile")] public class ProfileController : AbpControllerBase, IProfileAppService { protected IProfileAppService ProfileAppService { get; } diff --git a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs index acb48e2943..1382d412c5 100644 --- a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs +++ b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs @@ -82,6 +82,7 @@ namespace Volo.Abp.Account.Web .Configure(typeof(ManageModel).FullName, configuration => { + configuration.AddFiles("/client-proxies/account-proxy.js"); configuration.AddFiles("/Pages/Account/Components/ProfileManagementGroup/Password/Default.js"); configuration.AddFiles("/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.js"); }); diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.js b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.js index bc01f152b3..73e29ce20b 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.js +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.js @@ -23,7 +23,7 @@ return; } - volo.abp.identity.profile.changePassword(input).then(function (result) { + volo.abp.account.profile.changePassword(input).then(function (result) { abp.message.success(l('PasswordChanged')); }); }); diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.js b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.js index 11fbf97063..3422b36d63 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.js +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.js @@ -11,7 +11,7 @@ var input = $('#PersonalSettingsForm').serializeFormToObject(); - volo.abp.identity.profile.update(input).then(function (result) { + volo.abp.account.profile.update(input).then(function (result) { abp.notify.success(l('PersonalSettingsSaved')); }); }); diff --git a/modules/account/src/Volo.Abp.Account.Web/wwwroot/client-proxies/account-proxy.js b/modules/account/src/Volo.Abp.Account.Web/wwwroot/client-proxies/account-proxy.js index 8864396741..7a6ed6f47f 100644 --- a/modules/account/src/Volo.Abp.Account.Web/wwwroot/client-proxies/account-proxy.js +++ b/modules/account/src/Volo.Abp.Account.Web/wwwroot/client-proxies/account-proxy.js @@ -71,6 +71,38 @@ })(); + // controller volo.abp.account.profile + + (function(){ + + abp.utils.createNamespace(window, 'volo.abp.account.profile'); + + volo.abp.account.profile.get = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/account/my-profile', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.account.profile.update = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/account/my-profile', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.abp.account.profile.changePassword = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/account/my-profile/change-password', + type: 'POST', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + })(); + })(); diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/AbpIdentityApplicationModuleAutoMapperProfile.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/AbpIdentityApplicationModuleAutoMapperProfile.cs index 4c28e37f01..7b166152b0 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/AbpIdentityApplicationModuleAutoMapperProfile.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/AbpIdentityApplicationModuleAutoMapperProfile.cs @@ -1,5 +1,4 @@ using AutoMapper; -using Volo.Abp.AutoMapper; namespace Volo.Abp.Identity { @@ -12,11 +11,6 @@ namespace Volo.Abp.Identity CreateMap() .MapExtraProperties(); - - CreateMap() - .ForMember(dest => dest.HasPassword, - op => op.MapFrom(src => src.PasswordHash != null)) - .MapExtraProperties(); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/identity-generate-proxy.json b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/identity-generate-proxy.json index 00dd299ce9..c082a7bda4 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/identity-generate-proxy.json +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/identity-generate-proxy.json @@ -903,110 +903,9 @@ "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" } } - }, - "Volo.Abp.Identity.ProfileController": { - "controllerName": "Profile", - "controllerGroupName": "Profile", - "type": "Volo.Abp.Identity.ProfileController", - "interfaces": [ - { - "type": "Volo.Abp.Identity.IProfileAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/my-profile", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Identity.ProfileDto", - "typeSimple": "Volo.Abp.Identity.ProfileDto" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IProfileAppService" - }, - "UpdateAsyncByInput": { - "uniqueName": "UpdateAsyncByInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/my-profile", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UpdateProfileDto", - "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.Identity.UpdateProfileDto", - "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.ProfileDto", - "typeSimple": "Volo.Abp.Identity.ProfileDto" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IProfileAppService" - }, - "ChangePasswordAsyncByInput": { - "uniqueName": "ChangePasswordAsyncByInput", - "name": "ChangePasswordAsync", - "httpMethod": "POST", - "url": "api/identity/my-profile/change-password", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.ChangePasswordInput", - "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.Identity.ChangePasswordInput", - "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IProfileAppService" - } - } } } } }, "types": {} -} \ No newline at end of file +} diff --git a/modules/identity/src/Volo.Abp.Identity.Web/wwwroot/client-proxies/identity-proxy.js b/modules/identity/src/Volo.Abp.Identity.Web/wwwroot/client-proxies/identity-proxy.js index 824b5cbdeb..250abbc47b 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/wwwroot/client-proxies/identity-proxy.js +++ b/modules/identity/src/Volo.Abp.Identity.Web/wwwroot/client-proxies/identity-proxy.js @@ -177,38 +177,6 @@ })(); - // controller volo.abp.identity.profile - - (function(){ - - abp.utils.createNamespace(window, 'volo.abp.identity.profile'); - - volo.abp.identity.profile.get = function(ajaxParams) { - return abp.ajax($.extend(true, { - url: abp.appPath + 'api/identity/my-profile', - type: 'GET' - }, ajaxParams)); - }; - - volo.abp.identity.profile.update = function(input, ajaxParams) { - return abp.ajax($.extend(true, { - url: abp.appPath + 'api/identity/my-profile', - type: 'PUT', - data: JSON.stringify(input) - }, ajaxParams)); - }; - - volo.abp.identity.profile.changePassword = function(input, ajaxParams) { - return abp.ajax($.extend(true, { - url: abp.appPath + 'api/identity/my-profile/change-password', - type: 'POST', - dataType: null, - data: JSON.stringify(input) - }, ajaxParams)); - }; - - })(); - })();