remove unnecessary API methods
This commit is contained in:
@ -6,7 +6,6 @@ namespace Oqtane.Services
|
||||
{
|
||||
public interface IPageModuleService
|
||||
{
|
||||
Task<List<PageModule>> GetPageModulesAsync();
|
||||
Task<PageModule> GetPageModuleAsync(int PageModuleId);
|
||||
Task<PageModule> GetPageModuleAsync(int PageId, int ModuleId);
|
||||
Task<PageModule> AddPageModuleAsync(PageModule PageModule);
|
||||
|
@ -6,8 +6,6 @@ namespace Oqtane.Services
|
||||
{
|
||||
public interface IProfileService
|
||||
{
|
||||
Task<List<Profile>> GetProfilesAsync();
|
||||
|
||||
Task<List<Profile>> GetProfilesAsync(int SiteId);
|
||||
|
||||
Task<Profile> GetProfileAsync(int ProfileId);
|
||||
|
@ -6,8 +6,6 @@ namespace Oqtane.Services
|
||||
{
|
||||
public interface IRoleService
|
||||
{
|
||||
Task<List<Role>> GetRolesAsync();
|
||||
|
||||
Task<List<Role>> GetRolesAsync(int SiteId);
|
||||
|
||||
Task<Role> GetRoleAsync(int RoleId);
|
||||
|
@ -7,7 +7,6 @@ namespace Oqtane.Services
|
||||
public interface ISiteService
|
||||
{
|
||||
Task<List<Site>> GetSitesAsync();
|
||||
Task<List<Site>> GetSitesAsync(Alias Alias);
|
||||
|
||||
Task<Site> GetSiteAsync(int SiteId);
|
||||
Task<Site> GetSiteAsync(int SiteId, Alias Alias);
|
||||
|
@ -6,7 +6,6 @@ namespace Oqtane.Services
|
||||
{
|
||||
public interface IUserRoleService
|
||||
{
|
||||
Task<List<UserRole>> GetUserRolesAsync();
|
||||
Task<List<UserRole>> GetUserRolesAsync(int SiteId);
|
||||
Task<UserRole> GetUserRoleAsync(int UserRoleId);
|
||||
Task<UserRole> AddUserRoleAsync(UserRole UserRole);
|
||||
|
@ -6,8 +6,6 @@ namespace Oqtane.Services
|
||||
{
|
||||
public interface IUserService
|
||||
{
|
||||
Task<List<User>> GetUsersAsync();
|
||||
|
||||
Task<User> GetUserAsync(int UserId, int SiteId);
|
||||
|
||||
Task<User> GetUserAsync(string Username, int SiteId);
|
||||
|
@ -26,11 +26,6 @@ namespace Oqtane.Services
|
||||
get { return CreateApiUrl(sitestate.Alias, NavigationManager.Uri, "PageModule"); }
|
||||
}
|
||||
|
||||
public async Task<List<PageModule>> GetPageModulesAsync()
|
||||
{
|
||||
return await http.GetJsonAsync<List<PageModule>>(apiurl);
|
||||
}
|
||||
|
||||
public async Task<PageModule> GetPageModuleAsync(int PageModuleId)
|
||||
{
|
||||
return await http.GetJsonAsync<PageModule>(apiurl + "/" + PageModuleId.ToString());
|
||||
|
@ -26,11 +26,6 @@ namespace Oqtane.Services
|
||||
get { return CreateApiUrl(sitestate.Alias, NavigationManager.Uri, "Profile"); }
|
||||
}
|
||||
|
||||
public async Task<List<Profile>> GetProfilesAsync()
|
||||
{
|
||||
return await http.GetJsonAsync<List<Profile>>(apiurl);
|
||||
}
|
||||
|
||||
public async Task<List<Profile>> GetProfilesAsync(int SiteId)
|
||||
{
|
||||
List<Profile> Profiles = await http.GetJsonAsync<List<Profile>>(apiurl + "?siteid=" + SiteId.ToString());
|
||||
|
@ -26,12 +26,6 @@ namespace Oqtane.Services
|
||||
get { return CreateApiUrl(sitestate.Alias, NavigationManager.Uri, "Role"); }
|
||||
}
|
||||
|
||||
public async Task<List<Role>> GetRolesAsync()
|
||||
{
|
||||
List<Role> Roles = await http.GetJsonAsync<List<Role>>(apiurl);
|
||||
return Roles.OrderBy(item => item.Name).ToList();
|
||||
}
|
||||
|
||||
public async Task<List<Role>> GetRolesAsync(int SiteId)
|
||||
{
|
||||
List<Role> Roles = await http.GetJsonAsync<List<Role>>(apiurl + "?siteid=" + SiteId.ToString());
|
||||
|
@ -31,11 +31,6 @@ namespace Oqtane.Services
|
||||
List<Site> sites = await http.GetJsonAsync<List<Site>>(apiurl);
|
||||
return sites.OrderBy(item => item.Name).ToList();
|
||||
}
|
||||
public async Task<List<Site>> GetSitesAsync(Alias Alias)
|
||||
{
|
||||
List<Site> sites = await http.GetJsonAsync<List<Site>>(CreateApiUrl(Alias, NavigationManager.Uri, "Site"));
|
||||
return sites.OrderBy(item => item.Name).ToList();
|
||||
}
|
||||
|
||||
public async Task<Site> GetSiteAsync(int SiteId)
|
||||
{
|
||||
|
@ -26,11 +26,6 @@ namespace Oqtane.Services
|
||||
get { return CreateApiUrl(sitestate.Alias, NavigationManager.Uri, "UserRole"); }
|
||||
}
|
||||
|
||||
public async Task<List<UserRole>> GetUserRolesAsync()
|
||||
{
|
||||
return await http.GetJsonAsync<List<UserRole>>(apiurl);
|
||||
}
|
||||
|
||||
public async Task<List<UserRole>> GetUserRolesAsync(int SiteId)
|
||||
{
|
||||
return await http.GetJsonAsync<List<UserRole>>(apiurl + "?siteid=" + SiteId.ToString());
|
||||
|
@ -27,12 +27,6 @@ namespace Oqtane.Services
|
||||
get { return CreateApiUrl(sitestate.Alias, NavigationManager.Uri, "User"); }
|
||||
}
|
||||
|
||||
public async Task<List<User>> GetUsersAsync()
|
||||
{
|
||||
List<User> users = await http.GetJsonAsync<List<User>>(apiurl);
|
||||
return users.OrderBy(item => item.DisplayName).ToList();
|
||||
}
|
||||
|
||||
public async Task<User> GetUserAsync(int UserId, int SiteId)
|
||||
{
|
||||
return await http.GetJsonAsync<User>(apiurl + "/" + UserId.ToString() + "?siteid=" + SiteId.ToString());
|
||||
|
Reference in New Issue
Block a user