Compare commits

...
1 Commits
Author SHA1 Message Date
xrain 8f41ba0150 move common controller to api group 2021-05-30 03:35:27 +08:00
+3 -1
View File
@@ -6,6 +6,7 @@ using SimApi.Helpers;
namespace SimApi.Controllers namespace SimApi.Controllers
{ {
[ApiExplorerSettings(GroupName = "api")]
public class YYCommonController : SimApiBaseController public class YYCommonController : SimApiBaseController
{ {
private SimApiAuth Auth { get; } private SimApiAuth Auth { get; }
@@ -37,7 +38,7 @@ namespace SimApi.Controllers
public SimApiBaseResponse<int> CheckLogin() public SimApiBaseResponse<int> CheckLogin()
{ {
ErrorWhenNull(LoginInfo, 401); ErrorWhenNull(LoginInfo, 401);
return new SimApiBaseResponse<int> { Data = LoginInfo.Id }; return new SimApiBaseResponse<int> {Data = LoginInfo.Id};
} }
/// <summary> /// <summary>
@@ -53,6 +54,7 @@ namespace SimApi.Controllers
{ {
token = Request.Headers["Token"]; token = Request.Headers["Token"];
} }
Auth.Logout(token); Auth.Logout(token);
return new SimApiBaseResponse(); return new SimApiBaseResponse();
} }