修复一些api控制器错误
This commit is contained in:
parent
4ea469a1fa
commit
20e134fba4
|
@ -45,6 +45,11 @@ namespace FAuth.Controllers.api
|
||||||
return newApp;
|
return newApp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除一个应用
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="appName">应用名称</param>
|
||||||
|
/// <returns>删除结果</returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public bool RemoveApp(string appName) {
|
public bool RemoveApp(string appName) {
|
||||||
if(appName.IsNullOrEmpty()) {
|
if(appName.IsNullOrEmpty()) {
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace FAuth.Controllers.api
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[ProducesResponseType(typeof(Roles),200)]
|
[ProducesResponseType(typeof(Roles),200)]
|
||||||
public Roles GetApps(string roleName) {
|
public Roles GetRoles(string roleName) {
|
||||||
var qu = this.Db.Roles.Where(m => m.Name == roleName);
|
var qu = this.Db.Roles.Where(m => m.Name == roleName);
|
||||||
if(qu.Any()) {
|
if(qu.Any()) {
|
||||||
return qu.First();
|
return qu.First();
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace FAuth.Controllers.api
|
||||||
/// <returns>角色组信息</returns>
|
/// <returns>角色组信息</returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[ProducesResponseType(typeof(RoleGroup),200)]
|
[ProducesResponseType(typeof(RoleGroup),200)]
|
||||||
public RoleGroup AddNew(string name,string description) {
|
public RoleGroup AddNewGroup(string name,string description) {
|
||||||
if(name.IsNullOrEmpty()) {
|
if(name.IsNullOrEmpty()) {
|
||||||
throw new ApiArgumentNullException(nameof(name));
|
throw new ApiArgumentNullException(nameof(name));
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ namespace FAuth.Controllers.api
|
||||||
/// <returns>角色组信息</returns>
|
/// <returns>角色组信息</returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[ProducesResponseType(typeof(RoleGroup),200)]
|
[ProducesResponseType(typeof(RoleGroup),200)]
|
||||||
public RoleGroup GetApps(string name) {
|
public RoleGroup GetRoleGroups(string name) {
|
||||||
if(string.IsNullOrEmpty(name))
|
if(string.IsNullOrEmpty(name))
|
||||||
throw new ApiArgumentNullException(nameof(name));
|
throw new ApiArgumentNullException(nameof(name));
|
||||||
var qu = this.Db.RoleGroups.Where(m => m.Name == name);
|
var qu = this.Db.RoleGroups.Where(m => m.Name == name);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user