修复一些api控制器错误

This commit is contained in:
falcon 2020-05-06 16:02:54 +08:00
parent 4ea469a1fa
commit 20e134fba4
3 changed files with 8 additions and 3 deletions

View File

@ -45,6 +45,11 @@ namespace FAuth.Controllers.api
return newApp;
}
/// <summary>
/// 删除一个应用
/// </summary>
/// <param name="appName">应用名称</param>
/// <returns>删除结果</returns>
[HttpPost]
public bool RemoveApp(string appName) {
if(appName.IsNullOrEmpty()) {

View File

@ -51,7 +51,7 @@ namespace FAuth.Controllers.api
/// <returns></returns>
[HttpPost]
[ProducesResponseType(typeof(Roles),200)]
public Roles GetApps(string roleName) {
public Roles GetRoles(string roleName) {
var qu = this.Db.Roles.Where(m => m.Name == roleName);
if(qu.Any()) {
return qu.First();

View File

@ -25,7 +25,7 @@ namespace FAuth.Controllers.api
/// <returns>角色组信息</returns>
[HttpPost]
[ProducesResponseType(typeof(RoleGroup),200)]
public RoleGroup AddNew(string name,string description) {
public RoleGroup AddNewGroup(string name,string description) {
if(name.IsNullOrEmpty()) {
throw new ApiArgumentNullException(nameof(name));
}
@ -49,7 +49,7 @@ namespace FAuth.Controllers.api
/// <returns>角色组信息</returns>
[HttpPost]
[ProducesResponseType(typeof(RoleGroup),200)]
public RoleGroup GetApps(string name) {
public RoleGroup GetRoleGroups(string name) {
if(string.IsNullOrEmpty(name))
throw new ApiArgumentNullException(nameof(name));
var qu = this.Db.RoleGroups.Where(m => m.Name == name);