mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using System;
|
|
using System.Web.Mvc;
|
|
using Infrastructure;
|
|
using OpenAuth.App;
|
|
|
|
namespace OpenAuth.Mvc.Controllers
|
|
{
|
|
public class RelevanceManagerController : BaseController
|
|
{
|
|
public RevelanceManagerApp App { get; set; }
|
|
|
|
[HttpPost]
|
|
public string Assign(string type, string firstId, string[] secIds)
|
|
{
|
|
try
|
|
{
|
|
App.Assign(type, firstId, secIds);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Result.Code = 500;
|
|
Result.Message = ex.Message;
|
|
}
|
|
return JsonHelper.Instance.Serialize(Result);
|
|
}
|
|
[HttpPost]
|
|
public string UnAssign(string type, string firstId, string[] secIds)
|
|
{
|
|
try
|
|
{
|
|
App.UnAssign(type, firstId, secIds);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Result.Code = 500;
|
|
Result.Message = ex.Message;
|
|
}
|
|
return JsonHelper.Instance.Serialize(Result);
|
|
}
|
|
}
|
|
} |