From 573f246e7a119c33860b03bed2f267b320f74dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=8C=90=EB=8F=8C?= Date: Mon, 21 Aug 2023 12:51:06 +0900 Subject: [PATCH] =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=86=A0=EC=BD=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=EB=B0=8F=20=EC=9D=BC=EB=B6=80=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=9D=B8=EC=BD=94=EB=94=A9=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/SQL/UserSQL.cs | 4 +- Server/Service/{Test (복사).cs => AddUser.cs} | 88 +++++++++---------- Server/System/Enums.cs | 1 + 3 files changed, 47 insertions(+), 46 deletions(-) rename Server/Service/{Test (복사).cs => AddUser.cs} (59%) diff --git a/Server/SQL/UserSQL.cs b/Server/SQL/UserSQL.cs index 8e520c8..bbdbeee 100644 --- a/Server/SQL/UserSQL.cs +++ b/Server/SQL/UserSQL.cs @@ -9,9 +9,9 @@ public class UserSQL : SQL { - public void userInsert(User user) + public void userInsert(User user) { - string qurry = sqlInsert(user); + string qurry = sqlInsert(user); } } } diff --git a/Server/Service/Test (복사).cs b/Server/Service/AddUser.cs similarity index 59% rename from Server/Service/Test (복사).cs rename to Server/Service/AddUser.cs index bdae95f..00728cf 100644 --- a/Server/Service/Test (복사).cs +++ b/Server/Service/AddUser.cs @@ -1,44 +1,44 @@ -using Server.System; -using Newtonsoft.Json; - -namespace Server.Service -{ - public class Test : AbstractService - { - private TestReq req; - public override string Process() - { - return makeResp(); - } - - public override Protocol ProtocolValue() => Protocol.Test; - - public override Req Requst(string json) - { - req = JsonConvert.DeserializeObject(json); - return req; - } - - private string makeResp() - { - TestResp resp = new TestResp(); - resp.status = 200; - return resp.ToJson(); - } - - - } - - public class TestReq : Req - { - public override bool IsReceivedAllField() - { - return true; - } - } - - public class TestResp : Resp - { - - } -} +using Server.System; +using Newtonsoft.Json; + +namespace Server.Service +{ + public class AddUser : AbstractService + { + private AddUserReq req; + public override string Process() + { + return makeResp(); + } + + public override Protocol ProtocolValue() => Protocol.AddUser; + + public override Req Requst(string json) + { + req = JsonConvert.DeserializeObject(json); + return req; + } + + private string makeResp() + { + AddUserResp resp = new AddUserResp(); + resp.status = 200; + return resp.ToJson(); + } + + + } + + public class AddUserReq : Req + { + public override bool IsReceivedAllField() + { + return true; + } + } + + public class AddUserResp : Resp + { + + } +} diff --git a/Server/System/Enums.cs b/Server/System/Enums.cs index fdd0c72..6bd8da0 100644 --- a/Server/System/Enums.cs +++ b/Server/System/Enums.cs @@ -1,6 +1,7 @@ public enum Protocol { Test = 0, + AddUser = 1, } public enum Error