Skip to content

Commit

Permalink
used static javascript proxies in users page
Browse files Browse the repository at this point in the history
  • Loading branch information
hikalkan committed Sep 2, 2021
1 parent 6f87944 commit 5a0217b
Show file tree
Hide file tree
Showing 2 changed files with 216 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
}
@section scripts {
<abp-script-bundle name="@typeof(IndexModel).FullName">
<abp-script src="/Pages/AbpPermissionManagement/permission-management-modal.js" />
<abp-script src="/Pages/identity/users/index.js" />
<abp-script src="/client-proxies/identity-proxy.js" />
<abp-script src="/Pages/AbpPermissionManagement/permission-management-modal.js"/>
<abp-script src="/Pages/identity/users/index.js"/>
</abp-script-bundle>
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */

// module identity

(function(){

// controller volo.abp.identity.identityRole

(function(){

abp.utils.createNamespace(window, 'volo.abp.identity.identityRole');

volo.abp.identity.identityRole.getAllList = function(ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/roles/all',
type: 'GET'
}, ajaxParams));
};

volo.abp.identity.identityRole.getList = function(input, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/roles' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '',
type: 'GET'
}, ajaxParams));
};

volo.abp.identity.identityRole.get = function(id, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/roles/' + id + '',
type: 'GET'
}, ajaxParams));
};

volo.abp.identity.identityRole.create = function(input, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/roles',
type: 'POST',
data: JSON.stringify(input)
}, ajaxParams));
};

volo.abp.identity.identityRole.update = function(id, input, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/roles/' + id + '',
type: 'PUT',
data: JSON.stringify(input)
}, ajaxParams));
};

volo.abp.identity.identityRole['delete'] = function(id, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/roles/' + id + '',
type: 'DELETE',
dataType: null
}, ajaxParams));
};

})();

// controller volo.abp.identity.identityUser

(function(){

abp.utils.createNamespace(window, 'volo.abp.identity.identityUser');

volo.abp.identity.identityUser.get = function(id, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users/' + id + '',
type: 'GET'
}, ajaxParams));
};

volo.abp.identity.identityUser.getList = function(input, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '',
type: 'GET'
}, ajaxParams));
};

volo.abp.identity.identityUser.create = function(input, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users',
type: 'POST',
data: JSON.stringify(input)
}, ajaxParams));
};

volo.abp.identity.identityUser.update = function(id, input, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users/' + id + '',
type: 'PUT',
data: JSON.stringify(input)
}, ajaxParams));
};

volo.abp.identity.identityUser['delete'] = function(id, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users/' + id + '',
type: 'DELETE',
dataType: null
}, ajaxParams));
};

volo.abp.identity.identityUser.getRoles = function(id, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users/' + id + '/roles',
type: 'GET'
}, ajaxParams));
};

volo.abp.identity.identityUser.getAssignableRoles = function(ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users/assignable-roles',
type: 'GET'
}, ajaxParams));
};

volo.abp.identity.identityUser.updateRoles = function(id, input, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users/' + id + '/roles',
type: 'PUT',
dataType: null,
data: JSON.stringify(input)
}, ajaxParams));
};

volo.abp.identity.identityUser.findByUsername = function(userName, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users/by-username/' + userName + '',
type: 'GET'
}, ajaxParams));
};

volo.abp.identity.identityUser.findByEmail = function(email, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users/by-email/' + email + '',
type: 'GET'
}, ajaxParams));
};

})();

// controller volo.abp.identity.identityUserLookup

(function(){

abp.utils.createNamespace(window, 'volo.abp.identity.identityUserLookup');

volo.abp.identity.identityUserLookup.findById = function(id, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users/lookup/' + id + '',
type: 'GET'
}, ajaxParams));
};

volo.abp.identity.identityUserLookup.findByUserName = function(userName, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users/lookup/by-username/' + userName + '',
type: 'GET'
}, ajaxParams));
};

volo.abp.identity.identityUserLookup.search = function(input, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users/lookup/search' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '',
type: 'GET'
}, ajaxParams));
};

volo.abp.identity.identityUserLookup.getCount = function(input, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/identity/users/lookup/count' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }]) + '',
type: 'GET'
}, ajaxParams));
};

})();

// 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));
};

})();

})();


0 comments on commit 5a0217b

Please sign in to comment.