删除账号
This commit is contained in:
@@ -74,11 +74,12 @@ namespace Hncore.Pass.Vpn.Controllers
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<ApiResult> Delete([FromQuery]int id)
|
public async Task<ApiResult> Delete([FromQuery]int id)
|
||||||
{
|
{
|
||||||
var flag = await m_AccountService.DeleteById(id);
|
var account = await m_AccountService.Query(m => m.Id == id).FirstOrDefaultAsync();
|
||||||
if (flag)
|
account.DeleteTag = 1;
|
||||||
|
|
||||||
|
await m_AccountService.Update(account);
|
||||||
|
|
||||||
return Success();
|
return Success();
|
||||||
else
|
|
||||||
return Error("删除失败");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ namespace Hncore.Pass.Vpn.Service
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
//账号信息
|
//账号信息
|
||||||
var resp_info = await client.GetAsync("/userapi/?secretId=20210121152313846555&secretKey=C41nUV6KpjvdYkfr&type=getuserinfo&user="+account);
|
var resp_info = await client.GetAsync("/userapi/?secretId=20200716182518182489&secretKey=OFcEJAfzYjWT3e2s&type=getuserinfo&user="+account);
|
||||||
var content_info = await resp_info.Content.ReadAsStringAsync();
|
var content_info = await resp_info.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
JObject jo = (JObject)JsonConvert.DeserializeObject(content_info);
|
JObject jo = (JObject)JsonConvert.DeserializeObject(content_info);
|
||||||
|
|||||||
Reference in New Issue
Block a user