diff --git a/FunGame.Server/Controllers/Authenticator.cs b/FunGame.Server/Controllers/Authenticator.cs new file mode 100644 index 0000000..671e43c --- /dev/null +++ b/FunGame.Server/Controllers/Authenticator.cs @@ -0,0 +1,9 @@ +using Milimoe.FunGame.Core.Api.Transmittal; + +namespace Milimoe.FunGame.Server.Controllers +{ + public class Authenticator : Core.Library.Common.Architecture.Authenticator + { + public Authenticator(SQLHelper SQLHelper) : base(SQLHelper) { } + } +} diff --git a/FunGame.Server/Controllers/DataRequestController.cs b/FunGame.Server/Controllers/DataRequestController.cs index 08add5d..b210c4f 100644 --- a/FunGame.Server/Controllers/DataRequestController.cs +++ b/FunGame.Server/Controllers/DataRequestController.cs @@ -7,6 +7,7 @@ using Milimoe.FunGame.Core.Library.Common.Network; using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.SQLScript.Common; using Milimoe.FunGame.Core.Library.SQLScript.Entity; +using Milimoe.FunGame.Server.Controllers; using Milimoe.FunGame.Server.Model; using Milimoe.FunGame.Server.Others; using Milimoe.FunGame.Server.Utility; @@ -18,6 +19,7 @@ namespace Milimoe.FunGame.Server.Controller public ServerModel Server { get; } public MySQLHelper SQLHelper => Server.SQLHelper; public MailSender? MailSender => Server.MailSender; + public Authenticator Authenticator { get; } public DataRequestType LastRequest => _LastRequest; private string ForgetVerify = ""; @@ -27,6 +29,7 @@ namespace Milimoe.FunGame.Server.Controller public DataRequestController(ServerModel server) { Server = server; + Authenticator = new(SQLHelper); } public Hashtable GetResultData(DataRequestType type, Hashtable data) diff --git a/FunGame.Server/Utilities/MySQLHelper.cs b/FunGame.Server/Utilities/MySQLHelper.cs index b165bbe..f6843b6 100644 --- a/FunGame.Server/Utilities/MySQLHelper.cs +++ b/FunGame.Server/Utilities/MySQLHelper.cs @@ -15,7 +15,6 @@ namespace Milimoe.FunGame.Server.Utility public override string Script { get; set; } = ""; public override CommandType CommandType { get; set; } = CommandType.Text; public override SQLResult Result => _Result; - public override bool Success => Result == SQLResult.Success; public override SQLServerInfo ServerInfo => _ServerInfo ?? SQLServerInfo.Create(); public override int UpdateRows => _UpdateRows; public override DataSet DataSet => _DataSet;