From 80040638a6aa07afbb1fb1e0a5595b6556bf6b79 Mon Sep 17 00:00:00 2001 From: QkoSad Date: Thu, 5 Dec 2024 12:09:30 +0200 Subject: [PATCH] refractoring --- .../bin/Debug/net8.0/backendCs.Test.dll | Bin 17920 -> 17920 bytes .../bin/Debug/net8.0/backendCs.Test.pdb | Bin 14328 -> 14336 bytes .../net8.0/backendCs.Test.AssemblyInfo.cs | 2 +- .../backendCs.Test.AssemblyInfoInputs.cache | 2 +- ....GeneratedMSBuildEditorConfig.editorconfig | 2 +- .../Debug/net8.0/backendCs.Test.assets.cache | Bin 35937 -> 35937 bytes ...backendCs.Test.csproj.FileListAbsolute.txt | 110 +++++++++ .../obj/Debug/net8.0/backendCs.Test.dll | Bin 17920 -> 17920 bytes .../backendCs.Test.genruntimeconfig.cache | 2 +- .../obj/Debug/net8.0/backendCs.Test.pdb | Bin 14328 -> 14336 bytes .../obj/Debug/net8.0/ref/backendCs.Test.dll | Bin 9728 -> 9728 bytes .../Debug/net8.0/refint/backendCs.Test.dll | Bin 9728 -> 9728 bytes .../backendCs.Test.csproj.nuget.dgspec.json | 10 +- backendCs.Tests/obj/project.assets.json | 6 +- backendCs.Tests/obj/project.nuget.cache | 4 +- backendCs/Program.cs | 161 +++++++------ backendCs/bin/Debug/net8.0/TimelogBackend.dll | Bin 29184 -> 29696 bytes backendCs/bin/Debug/net8.0/TimelogBackend.pdb | Bin 18832 -> 18788 bytes .../net8.0/TimelogBackend.AssemblyInfo.cs | 2 +- .../TimelogBackend.AssemblyInfoInputs.cache | 2 +- ...TimelogBackend.csproj.FileListAbsolute.txt | 43 ++++ backendCs/obj/Debug/net8.0/TimelogBackend.dll | Bin 29184 -> 29696 bytes .../TimelogBackend.genruntimeconfig.cache | 2 +- backendCs/obj/Debug/net8.0/TimelogBackend.pdb | Bin 18832 -> 18788 bytes .../obj/Debug/net8.0/ref/TimelogBackend.dll | Bin 8192 -> 8192 bytes .../Debug/net8.0/refint/TimelogBackend.dll | Bin 8192 -> 8192 bytes .../TimelogBackend.csproj.nuget.dgspec.json | 10 +- backendCs/obj/project.assets.json | 6 +- backendCs/obj/project.nuget.cache | 4 +- backendCs/routes/CreateLog.cs | 219 +++++++++--------- backendCs/routes/CreateProcedure.cs | 51 ++-- backendCs/routes/Getall.cs | 197 ++++++++-------- backendCs/routes/Gettopten.cs | 159 +++++++------ backendCs/routes/Getuser.cs | 73 +++--- backendCs/routes/Login.cs | 206 ++++++++-------- backendCs/routes/Register.cs | 183 +++++++-------- backendCs/routes/Reset.cs | 40 ++-- 37 files changed, 814 insertions(+), 682 deletions(-) diff --git a/backendCs.Tests/bin/Debug/net8.0/backendCs.Test.dll b/backendCs.Tests/bin/Debug/net8.0/backendCs.Test.dll index 902e9a3eb4635371cd6ab2325d7b858921efbe4d..092507cfc24e5f03d162439ed6b3a6402384a0f3 100644 GIT binary patch delta 347 zcmZqZVQlDOoY28?{`Bq(6MJMB#U`!{XFN2Sk+GgpW^yBAJ>$2{j7;9f0xtxn=*Xoj zI?gkjyY|W1H&-{unEEm6SsIy{7@Jv`86>9|o1~;BTP7!`8KF)$c2GU!bfv{c#r$KnhV@0INMISh=x0Za@G49%0TTFbM}j$&Y#J^81#vVdNR zVa8TQ8;^;FyHi#-empu^$3}vyG%qbPFS9r!HD$89O^6XxO~ys28jyLLthYy*dcP6x zSn0z5DvALPSfUvi7!)QdiZOnh{KQ6UGOz8=&3txl%>I@PMhs>QCJe?5W(*b#W()=l z$qXqB#tbG5DGaF$$qbeZ$qdO1X$-~;X$+|hi44gMW(;NwsSGAymN7#TLn1>egE^SC XU`X4%*fEufNy2)wpv!y4i3aQdo2Y2@ delta 340 zcmZqZVQlDOoY28COLfPOi9Irmd=poOGwzs(&wbk6*kr3xk)p{uHWJL`nFW*mY(n&)lE=lMlJW2MMKJ7fSg5l3TRKa5UfAO( z1~~W|HTi;#6yy8JuWhs@i`o8|Xuz?V&(4k6Kbawk!JHw9!I&YDA%($`!Gs~1!IHs{ zArZ_sWiVqfWJqI3WUyo~V6b2?2g?{Uq%s&Vm@`-~q%xQ@n1EG)RGKj)Z(i(}%ETmK Ny;;!ZJ>x_Jb^tRSVSNAq diff --git a/backendCs.Tests/bin/Debug/net8.0/backendCs.Test.pdb b/backendCs.Tests/bin/Debug/net8.0/backendCs.Test.pdb index 857d4005ba9d2852b02cbba4ba5f42e5c77c53ff..49857740c1068463d0a6e2699b7ef1f256841f87 100644 GIT binary patch delta 865 zcmey7-%v22K;eKP1B0?tPJR*t1A|_PVa8TQ8;^;FyHi#-emr_5JATf@2{k6+42%qk z3``9D42%r37?>F385tRj7?~K1m>3zHnV1+RGchtOVPaxX+hAzUT~ zPD2Qbfq{u3Z?iDdZbq)#I!p`<49pA+x|44(Thxm&t23}NM6xC@uraXfCNQuw2;+)<0WkXjnEe3EegI}OFoH~AU<8?<0A?$I*$!Z~1DKrvW+#Bz z4Ip;CZUdOJ0L0N<0A?RxWMdH1J;2D$prZSLk&Qu1_W>h2gN3dG6C1+JNa06j(so6j(SI^z{{3K-wC>A`L7Y3=R4XV37x4kq0as443pDfJGcwLAo4RIT%z7 z99TiR7Jx+-uyQbz87u&cFtD*PFd8zjaWGsmU|{29cwmsg#>S9ln83!t5Mh`g1{ONN z1~TXX8wbNi!vk!b4E>WAvu@<(D$PsF%*!m!NKKg>!Di1aZ|**M7MmV7mp%g{8@GtO zc|+6WOKjb|yBiKQoNjp3@Ur23!{5zW?CgwO^5#tpO)O1ZO@foFIl>X#l*xBE+_mAd zM-@bT9;Qxd&)o2GiTR${?Atgd_ijIvk|wXGyQEb8-JcUGoBcRXXlmLquE}OxQ^dHY nmvPN>#x;u>*KB57bA&s%vbZEQS1%;BqJ#}B`en1d@lF;1WHz*_ delta 857 zcmZoD_>n)MKw*a=1B0?tPJR*t1B0lJfZJACJ@;vMW0S2)MT+9z?Yl8?LXAlP10zEe z0~13B10%yE1||k^Mn(oLMkWR=CPoHpCMJe%CPs!iOiT=Sm>3z}GBGhQGid2dc4V}# zXJBG5(`A4HCWZw_?2kxnCq1YV1}28dNbDy_Y*T%Nnl>c%4J5Xf0YXiU0Rw|5gv-Rh zXb533FfcKsZ5C$Q&B%3GhlzoKftlfl&g2`+7WI70>I|$5fvgD(Yz+T(5*XMSICRSx zm>Iko8^9tBV37r2_5v{b0GNFM%zgl7KLE2C7(pg5FoH}_0J9aqYzHvg0nAPSvlGDV z1`xYmrvc1a0OIH@0J9G;vN7=K9$;i=kkNg>$i|?g`+$+1!9dr6iH%`~t^*SXL#3_* z6DLEv?gFsL0wxZI$GQu^A`HwRH4Mxg3?_OE%pf%hV37o74u)2}1hB{fu*d;s4u)%b z^#{O03M?RP3M?E9>iP;SAZ-m`kp>nHh6?=#u*d_j$O9G*hEw_vz#JVz7}(etei|^aaWI@RU|{29xM7gM#>Nn5n83!t5MY=f1{ONN z1~TXX8wbNm!vk!b4DFK_vuTWsCD zn;UjD9B#PP@UY=|!`ID4?CgwO5(bSw8visgHE~XE<_Je{VP#?>l&0(A;G&Ri_*CaEp$zoj7%DASVam{ST fHLDrd?BNcsEG|jS)eA|jC}9JOzS-<*M)O~cp IMh(jz018?aUjP6A diff --git a/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.csproj.FileListAbsolute.txt b/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.csproj.FileListAbsolute.txt index bcf32ea..0924981 100644 --- a/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.csproj.FileListAbsolute.txt +++ b/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.csproj.FileListAbsolute.txt @@ -218,3 +218,113 @@ /home/arch/projects/wip/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.pdb /home/arch/projects/wip/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.genruntimeconfig.cache /home/arch/projects/wip/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/ref/backendCs.Test.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.TestPlatform.AdapterUtilities.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/backendCs.Test.deps.json +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/backendCs.Test.runtimeconfig.json +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/backendCs.Test.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/backendCs.Test.pdb +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.VisualStudio.CodeCoverage.Shim.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.TestPlatform.CoreUtilities.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.TestPlatform.PlatformAbstractions.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.VisualStudio.TestPlatform.ObjectModel.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.TestPlatform.CommunicationUtilities.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.TestPlatform.CrossPlatEngine.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.TestPlatform.Utilities.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.VisualStudio.TestPlatform.Common.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/testhost.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.VisualStudio.TestPlatform.TestFramework.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Newtonsoft.Json.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/NuGet.Frameworks.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/cs/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/cs/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/de/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/de/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/es/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/es/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/fr/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/fr/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/it/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/it/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ja/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ja/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ko/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ko/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/pl/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/pl/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/pt-BR/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/pt-BR/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ru/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ru/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/tr/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/tr/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/zh-Hans/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/zh-Hans/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/zh-Hant/Microsoft.TestPlatform.CoreUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/zh-Hant/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/cs/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/cs/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/cs/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/de/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/de/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/de/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/es/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/es/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/es/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/fr/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/fr/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/fr/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/it/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/it/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/it/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ja/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ja/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ja/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ko/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ko/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ko/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/pl/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/pl/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/pl/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/pt-BR/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/pt-BR/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/pt-BR/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ru/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ru/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ru/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/tr/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/tr/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/tr/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/zh-Hans/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/zh-Hans/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/zh-Hans/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/zh-Hant/Microsoft.TestPlatform.CommunicationUtilities.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/zh-Hant/Microsoft.TestPlatform.CrossPlatEngine.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/zh-Hant/Microsoft.VisualStudio.TestPlatform.Common.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/cs/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/de/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/es/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/fr/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/it/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ja/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ko/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/pl/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/pt-BR/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/ru/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/tr/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/zh-Hans/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/zh-Hant/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/bin/Debug/net8.0/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.csproj.AssemblyReference.cache +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.GeneratedMSBuildEditorConfig.editorconfig +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.AssemblyInfoInputs.cache +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.AssemblyInfo.cs +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.csproj.CoreCompileInputs.cache +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.csproj.CopyComplete +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/refint/backendCs.Test.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.pdb +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.genruntimeconfig.cache +/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/Debug/net8.0/ref/backendCs.Test.dll diff --git a/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.dll b/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.dll index 902e9a3eb4635371cd6ab2325d7b858921efbe4d..092507cfc24e5f03d162439ed6b3a6402384a0f3 100644 GIT binary patch delta 347 zcmZqZVQlDOoY28?{`Bq(6MJMB#U`!{XFN2Sk+GgpW^yBAJ>$2{j7;9f0xtxn=*Xoj zI?gkjyY|W1H&-{unEEm6SsIy{7@Jv`86>9|o1~;BTP7!`8KF)$c2GU!bfv{c#r$KnhV@0INMISh=x0Za@G49%0TTFbM}j$&Y#J^81#vVdNR zVa8TQ8;^;FyHi#-empu^$3}vyG%qbPFS9r!HD$89O^6XxO~ys28jyLLthYy*dcP6x zSn0z5DvALPSfUvi7!)QdiZOnh{KQ6UGOz8=&3txl%>I@PMhs>QCJe?5W(*b#W()=l z$qXqB#tbG5DGaF$$qbeZ$qdO1X$-~;X$+|hi44gMW(;NwsSGAymN7#TLn1>egE^SC XU`X4%*fEufNy2)wpv!y4i3aQdo2Y2@ delta 340 zcmZqZVQlDOoY28COLfPOi9Irmd=poOGwzs(&wbk6*kr3xk)p{uHWJL`nFW*mY(n&)lE=lMlJW2MMKJ7fSg5l3TRKa5UfAO( z1~~W|HTi;#6yy8JuWhs@i`o8|Xuz?V&(4k6Kbawk!JHw9!I&YDA%($`!Gs~1!IHs{ zArZ_sWiVqfWJqI3WUyo~V6b2?2g?{Uq%s&Vm@`-~q%xQ@n1EG)RGKj)Z(i(}%ETmK Ny;;!ZJ>x_Jb^tRSVSNAq diff --git a/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.genruntimeconfig.cache b/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.genruntimeconfig.cache index c599bd4..ff9ae85 100644 --- a/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.genruntimeconfig.cache +++ b/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.genruntimeconfig.cache @@ -1 +1 @@ -d00baeaa72366c300b98f70a63e07318bcfbf2aac3aa8140adbf3514d041b139 +44ffb3de93f5803a95865b1f18602ffa1a9e69b6b29642e60dde4719a8b98d5a diff --git a/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.pdb b/backendCs.Tests/obj/Debug/net8.0/backendCs.Test.pdb index 857d4005ba9d2852b02cbba4ba5f42e5c77c53ff..49857740c1068463d0a6e2699b7ef1f256841f87 100644 GIT binary patch delta 865 zcmey7-%v22K;eKP1B0?tPJR*t1A|_PVa8TQ8;^;FyHi#-emr_5JATf@2{k6+42%qk z3``9D42%r37?>F385tRj7?~K1m>3zHnV1+RGchtOVPaxX+hAzUT~ zPD2Qbfq{u3Z?iDdZbq)#I!p`<49pA+x|44(Thxm&t23}NM6xC@uraXfCNQuw2;+)<0WkXjnEe3EegI}OFoH~AU<8?<0A?$I*$!Z~1DKrvW+#Bz z4Ip;CZUdOJ0L0N<0A?RxWMdH1J;2D$prZSLk&Qu1_W>h2gN3dG6C1+JNa06j(so6j(SI^z{{3K-wC>A`L7Y3=R4XV37x4kq0as443pDfJGcwLAo4RIT%z7 z99TiR7Jx+-uyQbz87u&cFtD*PFd8zjaWGsmU|{29cwmsg#>S9ln83!t5Mh`g1{ONN z1~TXX8wbNi!vk!b4E>WAvu@<(D$PsF%*!m!NKKg>!Di1aZ|**M7MmV7mp%g{8@GtO zc|+6WOKjb|yBiKQoNjp3@Ur23!{5zW?CgwO^5#tpO)O1ZO@foFIl>X#l*xBE+_mAd zM-@bT9;Qxd&)o2GiTR${?Atgd_ijIvk|wXGyQEb8-JcUGoBcRXXlmLquE}OxQ^dHY nmvPN>#x;u>*KB57bA&s%vbZEQS1%;BqJ#}B`en1d@lF;1WHz*_ delta 857 zcmZoD_>n)MKw*a=1B0?tPJR*t1B0lJfZJACJ@;vMW0S2)MT+9z?Yl8?LXAlP10zEe z0~13B10%yE1||k^Mn(oLMkWR=CPoHpCMJe%CPs!iOiT=Sm>3z}GBGhQGid2dc4V}# zXJBG5(`A4HCWZw_?2kxnCq1YV1}28dNbDy_Y*T%Nnl>c%4J5Xf0YXiU0Rw|5gv-Rh zXb533FfcKsZ5C$Q&B%3GhlzoKftlfl&g2`+7WI70>I|$5fvgD(Yz+T(5*XMSICRSx zm>Iko8^9tBV37r2_5v{b0GNFM%zgl7KLE2C7(pg5FoH}_0J9aqYzHvg0nAPSvlGDV z1`xYmrvc1a0OIH@0J9G;vN7=K9$;i=kkNg>$i|?g`+$+1!9dr6iH%`~t^*SXL#3_* z6DLEv?gFsL0wxZI$GQu^A`HwRH4Mxg3?_OE%pf%hV37o74u)2}1hB{fu*d;s4u)%b z^#{O03M?RP3M?E9>iP;SAZ-m`kp>nHh6?=#u*d_j$O9G*hEw_vz#JVz7}(etei|^aaWI@RU|{29xM7gM#>Nn5n83!t5MY=f1{ONN z1~TXX8wbNm!vk!b4DFK_vuTWsCD zn;UjD9B#PP@UY=|!`ID4?CgwO5(bSw8visgHE~XE<_Je{VP#?>l&0(A;G&Ri_*CaEp$zoj7%DASVam{ST fHLDrd?BNcsEG|jS)eA|jC}9JOzS-<Iia&^Usv}<{97G!zPxcNWpMnMdz$p^&W z>scC^nHZZ{m>DFe7@MS|CR-*arx~ZECMKJirJ5w087C#CnkOY%q%klUGcxE+7L-)k z%qSVm;cv-c#9+o?!eGo`#$dr<#$dpZ%#gxh%wWQh!jQ_4%wWlo%#h5G#$e2l#*oU8 j$dJrn#$d*f%3uO!88aj?Br>Ejn1g8xhP2I#6=PWd*|{{O delta 204 zcmZqhY4DlQ!J=q%@BGG|5@vy)>$8p}rSEa;_~SjPI$d_}Wf+3Z`oWTUF0;JN6A$jv+#aI>q^lCYs diff --git a/backendCs.Tests/obj/Debug/net8.0/refint/backendCs.Test.dll b/backendCs.Tests/obj/Debug/net8.0/refint/backendCs.Test.dll index 4bb4000aca96597229247577f3333c6813c8bd03..a6c57c645a859018c7ce54e3a44a9a72a80d0be2 100644 GIT binary patch delta 204 zcmZqhY4DlQ!D6J`vU_7s3A2FZ@ntG&1?>Iia&^Usv}<{97G!zPxcNWpMnMdz$p^&W z>scC^nHZZ{m>DFe7@MS|CR-*arx~ZECMKJirJ5w087C#CnkOY%q%klUGcxE+7L-)k z%qSVm;cv-c#9+o?!eGo`#$dr<#$dpZ%#gxh%wWQh!jQ_4%wWlo%#h5G#$e2l#*oU8 j$dJrn#$d*f%3uO!88aj?Br>Ejn1g8xhP2I#6=PWd*|{{O delta 204 zcmZqhY4DlQ!J=q%@BGG|5@vy)>$8p}rSEa;_~SjPI$d_}Wf+3Z`oWTUF0;JN6A$jv+#aI>q^lCYs diff --git a/backendCs.Tests/obj/backendCs.Test.csproj.nuget.dgspec.json b/backendCs.Tests/obj/backendCs.Test.csproj.nuget.dgspec.json index 591e42a..7df9c3c 100644 --- a/backendCs.Tests/obj/backendCs.Test.csproj.nuget.dgspec.json +++ b/backendCs.Tests/obj/backendCs.Test.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "/home/arch/projects/wip/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj": {} + "/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj": {} }, "projects": { - "/home/arch/projects/wip/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj": { + "/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "/home/arch/projects/wip/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj", + "projectUniqueName": "/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj", "projectName": "backendCs.Test", - "projectPath": "/home/arch/projects/wip/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj", + "projectPath": "/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj", "packagesPath": "/home/arch/.nuget/packages/", - "outputPath": "/home/arch/projects/wip/timelog-interview-login/backendCs.Tests/obj/", + "outputPath": "/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/", "projectStyle": "PackageReference", "configFilePaths": [ "/home/arch/.nuget/NuGet/NuGet.Config" diff --git a/backendCs.Tests/obj/project.assets.json b/backendCs.Tests/obj/project.assets.json index 56c19f2..ec1da1c 100644 --- a/backendCs.Tests/obj/project.assets.json +++ b/backendCs.Tests/obj/project.assets.json @@ -1074,11 +1074,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "/home/arch/projects/wip/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj", + "projectUniqueName": "/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj", "projectName": "backendCs.Test", - "projectPath": "/home/arch/projects/wip/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj", + "projectPath": "/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj", "packagesPath": "/home/arch/.nuget/packages/", - "outputPath": "/home/arch/projects/wip/timelog-interview-login/backendCs.Tests/obj/", + "outputPath": "/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/obj/", "projectStyle": "PackageReference", "configFilePaths": [ "/home/arch/.nuget/NuGet/NuGet.Config" diff --git a/backendCs.Tests/obj/project.nuget.cache b/backendCs.Tests/obj/project.nuget.cache index 945ea96..065604d 100644 --- a/backendCs.Tests/obj/project.nuget.cache +++ b/backendCs.Tests/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "MZ1XesT3wmy51PIeGVUHDrPKvcZQbJPK8azHwfm2TlnGmdOSh+BLO5idLCALy5ldv/F004Vk+wySJwTZrnTuCw==", + "dgSpecHash": "Vow09WffKk6/6DguUqZNKmUYQdDCPGVBuip3M7OhLkceXUGI4wJgx+a7soIu/yv29h91cY3hReluc8rAg5j2ug==", "success": true, - "projectFilePath": "/home/arch/projects/wip/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj", + "projectFilePath": "/home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/backendCs.Test.csproj", "expectedPackageFiles": [ "/home/arch/.nuget/packages/coverlet.collector/6.0.0/coverlet.collector.6.0.0.nupkg.sha512", "/home/arch/.nuget/packages/microsoft.codecoverage/17.6.0/microsoft.codecoverage.17.6.0.nupkg.sha512", diff --git a/backendCs/Program.cs b/backendCs/Program.cs index e4e51af..8fb489e 100644 --- a/backendCs/Program.cs +++ b/backendCs/Program.cs @@ -1,102 +1,101 @@ using System.Net; using System.Text; -namespace Server +namespace Server; + +class Program { - class Program + static void HandleMissingPath(HttpListenerResponse response) { - static void HandleMissingPath(HttpListenerResponse response) - { - response.StatusCode = 404; - string errorMessage = "Not Found"; - byte[] buffer = Encoding.UTF8.GetBytes(errorMessage); - response.ContentType = "text/plain"; - response.ContentLength64 = buffer.Length; - response.OutputStream.Write(buffer, 0, buffer.Length); - response.OutputStream.Write(buffer, 0, buffer.Length); - } + response.StatusCode = 404; + string errorMessage = "Not Found"; + byte[] buffer = Encoding.UTF8.GetBytes(errorMessage); + response.ContentType = "text/plain"; + response.ContentLength64 = buffer.Length; + response.OutputStream.Write(buffer, 0, buffer.Length); + response.OutputStream.Write(buffer, 0, buffer.Length); + } - static void Main() - { - // create server - HttpListener listener = new HttpListener(); - // routes need to be added first - listener.Prefixes.Add("http://localhost:5000/api/getall/"); - listener.Prefixes.Add("http://localhost:5000/api/gettopten/"); - listener.Prefixes.Add("http://localhost:5000/api/getuser/"); - listener.Prefixes.Add("http://localhost:5000/api/reset/"); - listener.Prefixes.Add("http://localhost:5000/api/createp/"); - listener.Prefixes.Add("http://localhost:5000/api/register/"); - listener.Prefixes.Add("http://localhost:5000/api/login/"); - listener.Prefixes.Add("http://localhost:5000/api/createlog/"); + static void Main() + { + // create server + HttpListener listener = new(); + // routes need to be added first + listener.Prefixes.Add("http://localhost:5000/api/getall/"); + listener.Prefixes.Add("http://localhost:5000/api/gettopten/"); + listener.Prefixes.Add("http://localhost:5000/api/getuser/"); + listener.Prefixes.Add("http://localhost:5000/api/reset/"); + listener.Prefixes.Add("http://localhost:5000/api/createp/"); + listener.Prefixes.Add("http://localhost:5000/api/register/"); + listener.Prefixes.Add("http://localhost:5000/api/login/"); + listener.Prefixes.Add("http://localhost:5000/api/createlog/"); - // listen - listener.Start(); - Console.WriteLine("Server is listening on http://localhost:5000/"); - while (true) + // listen + listener.Start(); + Console.WriteLine("Server is listening on http://localhost:5000/"); + while (true) + { + HttpListenerContext context = listener.GetContext(); + HttpListenerRequest request = context.Request; + HttpListenerResponse response = context.Response; + // url after localhost:5000/ + string uri; + if (request != null && request.Url != null) + uri = request.Url.AbsolutePath; + else + return; + switch (request.HttpMethod) { - HttpListenerContext context = listener.GetContext(); - HttpListenerRequest request = context.Request; - HttpListenerResponse response = context.Response; - // url after localhost:5000/ - string uri; - if (request != null && request.Url != null) - uri = request.Url.AbsolutePath; - else - return; - switch (request.HttpMethod) - { - case "GET": + case "GET": + switch (uri) + { + case "/api/reset": + Reset.HandleRequest(response); + break; + case "/api/getall": + /* Thread clientThread = new Thread(() => Getall.HandleRequest(request, response)); */ + /* clientThread.Start(); */ + Getall.HandleRequest(request, response); + break; + case "/api/gettopten": + Gettopten.HandleRequest(request, response); + break; + case "/api/getuser": + Getuser.HandleRequest(request, response); + break; + case "/api/createp": + CreateProcedure.HandleRequest(response); + break; + default: + HandleMissingPath(response); + break; + } + break; + case "POST": + if (request.HasEntityBody) switch (uri) { - case "/api/reset": - Reset.HandleRequest(request, response); + case "/api/register": + Register.HandleRequest(request, response); break; - case "/api/getall": - /* Thread clientThread = new Thread(() => Getall.HandleRequest(request, response)); */ - /* clientThread.Start(); */ - Getall.HandleRequest(request, response); + case "/api/login": + Login.HandleRequest(request, response); break; - case "/api/gettopten": - Gettopten.HandleRequest(request, response); - break; - case "/api/getuser": - Getuser.HandleRequest(request, response); - break; - case "/api/createp": - CreateProcedure.HandleRequest(request, response); + case "/api/createlog": + CreateLog.HandleRequest(request, response, context); break; default: HandleMissingPath(response); break; } - break; - case "POST": - if (request.HasEntityBody) - switch (uri) - { - case "/api/register": - Register.HandleRequest(request, response); - break; - case "/api/login": - Login.HandleRequest(request, response); - break; - case "/api/createlog": - CreateLog.HandleRequest(request, response, context); - break; - default: - HandleMissingPath(response); - break; - } - else - { - HandleMissingPath(response); - } - break; - default: + else + { HandleMissingPath(response); - break; - } + } + break; + default: + HandleMissingPath(response); + break; } } } diff --git a/backendCs/bin/Debug/net8.0/TimelogBackend.dll b/backendCs/bin/Debug/net8.0/TimelogBackend.dll index 831f7750bf0c20928baa095c83898bc9d78ac9e8..518b0bce0bbbc7c1f4b181b718acd1c57d4ae84d 100644 GIT binary patch delta 7721 zcmZp8!r1VFaYBcZZ@l+!1}J#Ipv1tT5c@8iz@GvkiY-wX)2$`(Nq%%2^QJsq=gMooTfq{V`YjPK(He=4@ZH(%SMU(F_ zDk(f@2We+u@L*tIU}9ipsIXvQu<>JHUYyqPD@;`&?v7UZ$wU_$A&^FhcT{0QpkxCPQilm40#y?xga|Edn9wsN zSODsRgz^&^BpA3D7zBABVZ$%T4+$Gyjkw8i0%i5b85tNj85jf^7?|<{85p>@*oyvu zj4)$h;NoW2FlS)k;^oxgVJPBKW+*7OU|`^?Dz*eA`XUWwhJt)wP{{Le{2o6CG-L5*ZdWfwmViznK7#P7;p<9{>vQ&(Lfu#;aRA+%K z1+nTxA$qOFie9TS6o?@7N%VqBI8`xuMG=i`1_rK0s^Vf$mPQW9AGshSLE7u;L1c9v z$V?FHf(OhMf^7NupgdIo3Lti7L3Tt6X3+r!B&=NG7v^MO7UYDbV59^b&A`Cm!^ps} zoDnktZ)0R&*v`nnFnNoRMGChXLqTyND8h?^Sr`h6@>v)P#Cw$)7#LN>ia;5cskjK_ z4IyTYVvuuKg;I@7TRSXPV#nm8v3>@+b`8AX0 z2q!RhPW~$#&m^ukIe}e9mKU1(G}U0KPnboJ1(N-rx{qFA@hCQwQR4G6=Hg$4+Jxm0+}*EG23nY^4rM@PZr~#taN> z8gY|jMU5wOb8=3eAu6G`l7WHY00RRU}RvZoP1GKy*`rx9Qc9^P;YawX@Jta zMg!Q}Y-rx*W(WBiUpj1OJ2?(jWZv_k}!%DWC3S)-4H<* zu#mi*fhUwHVPr4J29Y%rWP`{W8E8Y9GDeDmtPoiVK~{*YoB=P4$@Py#n^9btQxI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3WGY|j1XZ~29TlB?EFFvC&8wH+?*>^%LFk| zMktU8oJ>wmewF5KiW!~4Y?y&802c$t{N%KBRY7(JCPpDoAzNkz1{qLBl9@aweXB-t zl6jJGVv40nvZY~SVv4DmVOpZ4frYtYqH(H$xkakEiD8EZ<~WG0Fi}yAX=mHyYnd9G ze`lIAZsyBzWA;yGNMbN&NMbN%NMuN1uw*b{NM^8PFl0ys^GzAd7z`QG7!nyQ84MUK s7|g*k#tf+p1`Os577VEj<_soa6(E&n49S}p=ch6;-7(uNnDvbj05A$_CjbBd diff --git a/backendCs/bin/Debug/net8.0/TimelogBackend.pdb b/backendCs/bin/Debug/net8.0/TimelogBackend.pdb index 5863be86fc96a181c0c1adc5b58c22818aa7b504..e0dae7cc064a8c88777e633d119a3f195a3c59f4 100644 GIT binary patch delta 3255 zcmbO*neoXa#tA0%4O|Qi%5@A33ET_}FBlmZl!Hr(GV{`l85kHCJa`!xSQr=>ltY6V ze0Uic3P5c4P)`>I28KPn3=Au*85oqEa`KZH7#I%Z{TEm}^{mG-P4hzvt&PSfH(Kvy zVqjnk7hS~3$;H6H$iTo5#=yY9&%nSS#=yW}&%nT-$-tn+(9XcX5Y52Az{kMAzyzgb zpfpI6AXJ=r;$7wXNCpOmLZ~Ss3=9lD42%q63``6S42%q23``9B85kMPfQ(^eWZ-3F zVz6LjWN>95Kv85z`=nHbWT85zo%nHU%uYIGSHg6s7_!NSC_TAzvGfj$$%Z+!?~*MOP9 z)PR}6*bu~LX6P|uVVGhBVzV;H8?!Q~8M89z8nZH(7_%~18?!Pv8M88Y8nZG47_%~j z8?!RR8M88^8nZIw7_%}I8?!Q08AJ3of@wAeJySLYQ&TpEdK*(V24_o>{Lv%7&K>4~1j12P_7#O@5AoBVQj10dS z7#Q9{`GyRP3=T{T3_qZJBL+qWA0`HdyHLI<10#bq^X7LfL5#M?85tN18MqmopmuD5 z@?9Ai8T=U-7*e5pHwH#<67z!cJsB7owok5QOBU>8WMD95;AIGcnou_RBb&71Tm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D?fU)HmV=Dt=t0rS>7*lHn zQ(GldyDwvBBPb;|Y~bg#Gz$j@gCZzML)bWk7#LY985xv7@uvfl28X( zsL95_#Q;K}JY1;AxE2#ze-(^J0t*zxWs!7!^4g8C01# zz!AfU>^JerA|9$T3~C&e?2HYQ*cf;j^jR2$8T6SLL>RO|gw14skHTm+P~SxyR9r|f zRdRxgMP?A8!>GvEFpshE17njWV^bkx(@w@_R>rnO#)i90%~^~c42+$fjGd1dyWcVO lNXMWSMJya_3<^vPJd?RSJp_^&8?G`orGnDDK)fXb0|17E3O@h< diff --git a/backendCs/obj/Debug/net8.0/TimelogBackend.AssemblyInfo.cs b/backendCs/obj/Debug/net8.0/TimelogBackend.AssemblyInfo.cs index d5e7eb6..c672b1a 100644 --- a/backendCs/obj/Debug/net8.0/TimelogBackend.AssemblyInfo.cs +++ b/backendCs/obj/Debug/net8.0/TimelogBackend.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("TimelogBackend")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cb7b3ad94c91aad561fa90871a3e078e741f566c")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+926436860cd34dec9ccf3feac66e4c63bae7ba8f")] [assembly: System.Reflection.AssemblyProductAttribute("TimelogBackend")] [assembly: System.Reflection.AssemblyTitleAttribute("TimelogBackend")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backendCs/obj/Debug/net8.0/TimelogBackend.AssemblyInfoInputs.cache b/backendCs/obj/Debug/net8.0/TimelogBackend.AssemblyInfoInputs.cache index a2b728d..c3c3cdd 100644 --- a/backendCs/obj/Debug/net8.0/TimelogBackend.AssemblyInfoInputs.cache +++ b/backendCs/obj/Debug/net8.0/TimelogBackend.AssemblyInfoInputs.cache @@ -1 +1 @@ -21ebdfea2f4ecbc0e48a6b53f27fa496a20e08b7ed0ace43e5500d5093c8a245 +4d078ebec60178a78b052888e79c6e658ccc73953d1f8ba236008a06ecc632b9 diff --git a/backendCs/obj/Debug/net8.0/TimelogBackend.csproj.FileListAbsolute.txt b/backendCs/obj/Debug/net8.0/TimelogBackend.csproj.FileListAbsolute.txt index 1180a5d..7d5be47 100644 --- a/backendCs/obj/Debug/net8.0/TimelogBackend.csproj.FileListAbsolute.txt +++ b/backendCs/obj/Debug/net8.0/TimelogBackend.csproj.FileListAbsolute.txt @@ -117,3 +117,46 @@ /home/arch/projects/wip/timelog-interview-login/backendCs/bin/Debug/net8.0/Microsoft.IdentityModel.Logging.dll /home/arch/projects/wip/timelog-interview-login/backendCs/bin/Debug/net8.0/Microsoft.IdentityModel.Tokens.dll /home/arch/projects/wip/timelog-interview-login/backendCs/bin/Debug/net8.0/System.IdentityModel.Tokens.Jwt.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/Debug/net8.0/TimelogBackend.csproj.AssemblyReference.cache +/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/Debug/net8.0/TimelogBackend.GeneratedMSBuildEditorConfig.editorconfig +/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/Debug/net8.0/TimelogBackend.AssemblyInfoInputs.cache +/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/Debug/net8.0/TimelogBackend.AssemblyInfo.cs +/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/Debug/net8.0/TimelogBackend.csproj.CoreCompileInputs.cache +/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/Debug/net8.0/TimelogBackend.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/Debug/net8.0/refint/TimelogBackend.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/Debug/net8.0/TimelogBackend.pdb +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/TimelogBackend +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/TimelogBackend.deps.json +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/TimelogBackend.runtimeconfig.json +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/TimelogBackend.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/TimelogBackend.pdb +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/BouncyCastle.Cryptography.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/Google.Protobuf.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/K4os.Compression.LZ4.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/K4os.Compression.LZ4.Streams.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/K4os.Hash.xxHash.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/Microsoft.IdentityModel.Abstractions.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/Microsoft.IdentityModel.JsonWebTokens.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/Microsoft.IdentityModel.Logging.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/Microsoft.IdentityModel.Tokens.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/MySql.Data.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/Newtonsoft.Json.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/System.Configuration.ConfigurationManager.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/System.Diagnostics.EventLog.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/System.IdentityModel.Tokens.Jwt.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/System.IO.Pipelines.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/System.Security.Cryptography.ProtectedData.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/System.Security.Permissions.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/System.Windows.Extensions.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/ZstdSharp.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/runtimes/win-x64/native/comerr64.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/runtimes/win-x64/native/gssapi64.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/runtimes/win-x64/native/k5sprt64.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/runtimes/win-x64/native/krb5_64.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/runtimes/win-x64/native/krbcc64.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/runtimes/win/lib/net8.0/System.Diagnostics.EventLog.Messages.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/runtimes/win/lib/net8.0/System.Diagnostics.EventLog.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/bin/Debug/net8.0/runtimes/win/lib/net8.0/System.Windows.Extensions.dll +/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/Debug/net8.0/TimelogBackend.csproj.CopyComplete +/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/Debug/net8.0/TimelogBackend.genruntimeconfig.cache +/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/Debug/net8.0/ref/TimelogBackend.dll diff --git a/backendCs/obj/Debug/net8.0/TimelogBackend.dll b/backendCs/obj/Debug/net8.0/TimelogBackend.dll index 831f7750bf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DmVOpZ4frYtYqH(H$xkakEiD8EZ<~WG0Fi}yAX=mHyYnd9G ze`lIAZsyBzWA;yGNMbN&NMbN%NMuN1uw*b{NM^8PFl0ys^GzAd7z`QG7!nyQ84MUK s7|g*k#tf+p1`Os577VEj<_soa6(E&n49S}p=ch6;-7(uNnDvbj05A$_CjbBd diff --git a/backendCs/obj/Debug/net8.0/TimelogBackend.genruntimeconfig.cache b/backendCs/obj/Debug/net8.0/TimelogBackend.genruntimeconfig.cache index 5fb506c..2bc4106 100644 --- a/backendCs/obj/Debug/net8.0/TimelogBackend.genruntimeconfig.cache +++ b/backendCs/obj/Debug/net8.0/TimelogBackend.genruntimeconfig.cache @@ -1 +1 @@ -cabec8eef32bfb7a5e67f2b4ed57839edd7c13e8479c77f87a2d35ec66b02abb +6ce12d87876379d820297a17b33b1f57ff3987d74bed581fb7ebcc8c73660966 diff --git a/backendCs/obj/Debug/net8.0/TimelogBackend.pdb b/backendCs/obj/Debug/net8.0/TimelogBackend.pdb index 5863be86fc96a181c0c1adc5b58c22818aa7b504..e0dae7cc064a8c88777e633d119a3f195a3c59f4 100644 GIT binary patch delta 3255 zcmbO*neoXa#tA0%4O|Qi%5@A33ET_}FBlmZl!Hr(GV{`l85kHCJa`!xSQr=>ltY6V ze0Uic3P5c4P)`>I28KPn3=Au*85oqEa`KZH7#I%Z{TEm}^{mG-P4hzvt&PSfH(Kvy zVqjnk7hS~3$;H6H$iTo5#=yY9&%nSS#=yW}&%nT-$-tn+(9XcX5Y52Az{kMAzyzgb zpfpI6AXJ=r;$7wXNCpOmLZ~Ss3=9lD42%q63``6S42%q23``9B85kMPfQ(^eWZ-3F zVz6LjWN>95Kv85z`=nHbWT85zo%nHU%uYIGSHg6s7_!NSC_TAzvGfj$$%Z+!?~*MOP9 z)PR}6*bu~LX6P|uVVGhBVzV;H8?!Q~8M89z8nZH(7_%~18?!Pv8M88Y8nZG47_%~j z8?!RR8M88^8nZIw7_%}I8?!Q08AJ3of@wAeJySLYQ&Tp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(297s0XzMgUWF~)WB(44kqHRFc6yo|z(X^aiKLG3Cr#sqE#21aGh$v<6V zbi^1NCNefUFgEEjHmzW4dL+ik)HJ{04i5tZqa)Ps%uE~t!VHXDm6IFY6a*R6*cjNE zwU`)q8MHYVgc)omuXUSNufv$c*tmtU@hvF1G_7Q8SjgD?fU)HmV=Dt=t0rS>7*lHn zQ(GldyDwvBBPb;|Y~bg#Gz$j@gCZzML)bWk7#LY985xv7@uvfl28X( zsL95_#Q;K}JY1;AxE2#ze-(^J0t*zxWs!7!^4g8C01# zz!AfU>^JerA|9$T3~C&e?2HYQ*cf;j^jR2$8T6SLL>RO|gw14skHTm+P~SxyR9r|f zRdRxgMP?A8!>GvEFpshE17njWV^bkx(@w@_R>rnO#)i90%~^~c42+$fjGd1dyWcVO lNXMWSMJya_3<^vPJd?RSJp_^&8?G`orGnDDK)fXb0|17E3O@h< diff --git a/backendCs/obj/Debug/net8.0/ref/TimelogBackend.dll b/backendCs/obj/Debug/net8.0/ref/TimelogBackend.dll index 805095acb5756af36ca29ad2471fa121b66539b3..c6915030db01de4e934dd553373f28a68f0e9de0 100644 GIT binary patch delta 1030 zcmZp0XmFU&!NU54sdr+J45QV=mEnvpCNnasvz`fHV33)t$fPqllF^^hVe?AHa3+EK zX95qMf1vHSe0t9E*%|xyZx&>E&&b3eGntW1n6*NHfq`+dB9r;#05%Oy2~GwE7#Ng8gBiB)F)#>#*zTd8E({C|M<#D%vu0G?{Fcp@slJ+llOe!? zfq{XcO+ufAje!fs<5Zn(I3Nuba;$<^VV&I3%l`u|2;{9fx#2^5dV_}(w;DNm)2$h@0 z@Q7tL1B?gpZoM#6vW){|41xzT2EhYaF9KHyvL36oz7OIZzlP zc%U#8uZK&50#O{!0|k@>ocEYv8Uup&hG7zeBwX${!!!gB>|ZIU9K^pc9>l*gC~`6k z^~iBA2bWyQyqE#Oo6oR7k8gxWJYmm zMw!X7;vXj(@NDLjaAWqjWH4edV=!SbW-w#0U@&7aU`S?2VK8PeVMt*}Wk_bQWJqR6 zW=LZ&W=La5Wk_U5W-wzgV@PE%0ke!5k{A*hQW?y_v;{-j=Ec&fOiVV0;OslmfE@ss C&&nwP delta 1042 zcmZp0XmFU&!NPOl%(aO7!UdR6mJ|bf99K^pc9>l-0C~~q4 z^~iBA50_lYyqE#Oo6oR;oY3PdF+4`Qealn1d8#)HVIp~%5_5IGHo03M{Ir!jdW zwl4m>=Q1$gRM!GfE6d8#=uvczNw(Mf{r3`~qdzCy0d3JfwV z3XF_0lXr{m)JRS;PclwSu{24xG)zoPF*P$xOSCkwFgHvzPBk#MNHsSxOfxkzOP)MO z%xAKII1igyAOiz~!$d_fMvcjW;vYBjNw_ilCo?25m@_0X7&9a?q%c@Am@p(WSTYzg zB!c;-3}y_53~3CB43-QA3>FOLU>ReER0abEa|R2BR0eYf6R--9N;8J!&5NZ|nV38b K!C85t0XqOY{mBsk diff --git a/backendCs/obj/Debug/net8.0/refint/TimelogBackend.dll b/backendCs/obj/Debug/net8.0/refint/TimelogBackend.dll index 805095acb5756af36ca29ad2471fa121b66539b3..c6915030db01de4e934dd553373f28a68f0e9de0 100644 GIT binary patch delta 1030 zcmZp0XmFU&!NU54sdr+J45QV=mEnvpCNnasvz`fHV33)t$fPqllF^^hVe?AHa3+EK zX95qMf1vHSe0t9E*%|xyZx&>E&&b3eGntW1n6*NHfq`+dB9r;#05%Oy2~GwE7#Ng8gBiB)F)#>#*zTd8E({C|M<#D%vu0G?{Fcp@slJ+llOe!? zfq{XcO+ufAje!fs<5Zn(I3Nuba;$<^VV&I3%l`u|2;{9fx#2^5dV_}(w;DNm)2$h@0 z@Q7tL1B?gpZoM#6vW){|41xzT2EhYaF9KHyvL36oz7OIZzlP zc%U#8uZK&50#O{!0|k@>ocEYv8Uup&hG7zeBwX${!!!gB>|ZIU9K^pc9>l*gC~`6k z^~iBA2bWyQyqE#Oo6oR7k8gxWJYmm zMw!X7;vXj(@NDLjaAWqjWH4edV=!SbW-w#0U@&7aU`S?2VK8PeVMt*}Wk_bQWJqR6 zW=LZ&W=La5Wk_U5W-wzgV@PE%0ke!5k{A*hQW?y_v;{-j=Ec&fOiVV0;OslmfE@ss C&&nwP delta 1042 zcmZp0XmFU&!NPOl%(aO7!UdR6mJ|bf99K^pc9>l-0C~~q4 z^~iBA50_lYyqE#Oo6oR;oY3PdF+4`Qealn1d8#)HVIp~%5_5IGHo03M{Ir!jdW zwl4m>=Q1$gRM!GfE6d8#=uvczNw(Mf{r3`~qdzCy0d3JfwV z3XF_0lXr{m)JRS;PclwSu{24xG)zoPF*P$xOSCkwFgHvzPBk#MNHsSxOfxkzOP)MO z%xAKII1igyAOiz~!$d_fMvcjW;vYBjNw_ilCo?25m@_0X7&9a?q%c@Am@p(WSTYzg zB!c;-3}y_53~3CB43-QA3>FOLU>ReER0abEa|R2BR0eYf6R--9N;8J!&5NZ|nV38b K!C85t0XqOY{mBsk diff --git a/backendCs/obj/TimelogBackend.csproj.nuget.dgspec.json b/backendCs/obj/TimelogBackend.csproj.nuget.dgspec.json index 6bf1f0a..0be0afb 100644 --- a/backendCs/obj/TimelogBackend.csproj.nuget.dgspec.json +++ b/backendCs/obj/TimelogBackend.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "/home/arch/projects/wip/timelog-interview-login/backendCs/TimelogBackend.csproj": {} + "/home/arch/projects/unfinished/timelog-interview-login/backendCs/TimelogBackend.csproj": {} }, "projects": { - "/home/arch/projects/wip/timelog-interview-login/backendCs/TimelogBackend.csproj": { + "/home/arch/projects/unfinished/timelog-interview-login/backendCs/TimelogBackend.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "/home/arch/projects/wip/timelog-interview-login/backendCs/TimelogBackend.csproj", + "projectUniqueName": "/home/arch/projects/unfinished/timelog-interview-login/backendCs/TimelogBackend.csproj", "projectName": "TimelogBackend", - "projectPath": "/home/arch/projects/wip/timelog-interview-login/backendCs/TimelogBackend.csproj", + "projectPath": "/home/arch/projects/unfinished/timelog-interview-login/backendCs/TimelogBackend.csproj", "packagesPath": "/home/arch/.nuget/packages/", - "outputPath": "/home/arch/projects/wip/timelog-interview-login/backendCs/obj/", + "outputPath": "/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/", "projectStyle": "PackageReference", "configFilePaths": [ "/home/arch/.nuget/NuGet/NuGet.Config" diff --git a/backendCs/obj/project.assets.json b/backendCs/obj/project.assets.json index 701aed3..9f15ef6 100644 --- a/backendCs/obj/project.assets.json +++ b/backendCs/obj/project.assets.json @@ -1857,11 +1857,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "/home/arch/projects/wip/timelog-interview-login/backendCs/TimelogBackend.csproj", + "projectUniqueName": "/home/arch/projects/unfinished/timelog-interview-login/backendCs/TimelogBackend.csproj", "projectName": "TimelogBackend", - "projectPath": "/home/arch/projects/wip/timelog-interview-login/backendCs/TimelogBackend.csproj", + "projectPath": "/home/arch/projects/unfinished/timelog-interview-login/backendCs/TimelogBackend.csproj", "packagesPath": "/home/arch/.nuget/packages/", - "outputPath": "/home/arch/projects/wip/timelog-interview-login/backendCs/obj/", + "outputPath": "/home/arch/projects/unfinished/timelog-interview-login/backendCs/obj/", "projectStyle": "PackageReference", "configFilePaths": [ "/home/arch/.nuget/NuGet/NuGet.Config" diff --git a/backendCs/obj/project.nuget.cache b/backendCs/obj/project.nuget.cache index 250be74..90efea6 100644 --- a/backendCs/obj/project.nuget.cache +++ b/backendCs/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "lhoNhBuhv5pZb43QtTahPtHclYQU5heHEQPyTVS7gTLS0zI+oKRmmyzvVbe56/iHd4Yw20shJvPbIdrCOp+Qug==", + "dgSpecHash": "Kw1QiagALZErTv+cX8IjNVaHlG1vVsZ8jbQdO6NwgQJYGShK1fNvP3A258Ci81RECrzVlyi53zgZ5YHVjUaNOw==", "success": true, - "projectFilePath": "/home/arch/projects/wip/timelog-interview-login/backendCs/TimelogBackend.csproj", + "projectFilePath": "/home/arch/projects/unfinished/timelog-interview-login/backendCs/TimelogBackend.csproj", "expectedPackageFiles": [ "/home/arch/.nuget/packages/bouncycastle.cryptography/2.3.1/bouncycastle.cryptography.2.3.1.nupkg.sha512", "/home/arch/.nuget/packages/google.protobuf/3.26.1/google.protobuf.3.26.1.nupkg.sha512", diff --git a/backendCs/routes/CreateLog.cs b/backendCs/routes/CreateLog.cs index 3f10956..e20458d 100644 --- a/backendCs/routes/CreateLog.cs +++ b/backendCs/routes/CreateLog.cs @@ -6,125 +6,124 @@ using Microsoft.IdentityModel.Tokens; using MySql.Data.MySqlClient; using Newtonsoft.Json.Linq; -namespace Server +namespace Server; + +public class CreateLog : Route { - public class CreateLog : Route + private static string secretKey = + "stronk-key-much-sercret-much-more-stronk-stronk-key-much-sercret-much-more-stronk"; + + private static bool ValidateToken(string token) { - private static string secretKey = - "stronk-key-much-sercret-much-more-stronk-stronk-key-much-sercret-much-more-stronk"; - - private static bool ValidateToken(string token) + try { - try + var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(secretKey)); + var tokenHandler = new JwtSecurityTokenHandler(); + var validationParameters = new TokenValidationParameters { - var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(secretKey)); - var tokenHandler = new JwtSecurityTokenHandler(); - var validationParameters = new TokenValidationParameters - { - ValidateIssuer = true, - ValidateAudience = true, - ValidateLifetime = true, - ValidIssuer = "TimeLogServer", - ValidAudience = "TimeLogWebsite", - IssuerSigningKey = key, - }; + ValidateIssuer = true, + ValidateAudience = true, + ValidateLifetime = true, + ValidIssuer = "TimeLogServer", + ValidAudience = "TimeLogWebsite", + IssuerSigningKey = key, + }; - var principal = tokenHandler.ValidateToken( - token, - validationParameters, - out SecurityToken validatedToken - ); - return validatedToken != null; - } - catch + var principal = tokenHandler.ValidateToken( + token, + validationParameters, + out SecurityToken validatedToken + ); + return validatedToken != null; + } + catch + { + return false; + } + } + + public static void HandleRequest( + HttpListenerRequest request, + HttpListenerResponse response, + HttpListenerContext context + ) + { + try + { + // check header + var headers = request.Headers; + string? token = headers["token"]; + if (!string.IsNullOrEmpty(token) && !ValidateToken(token)) { - return false; + throw new Exception("Invalid token"); + } + // prepare SQL query + MySqlCommand cmd = new MySqlCommand(); + // extact data from body + string body; + using ( + StreamReader bodyReader = new StreamReader( + request.InputStream, + request.ContentEncoding + ) + ) + { + body = bodyReader.ReadToEnd(); + } + JObject jsonObject = JObject.Parse(body); + string project = jsonObject["project"]?.ToString() ?? ""; + string time = jsonObject["time"]?.ToString() ?? ""; + string date = jsonObject["date"]?.ToString() ?? ""; + + // TODO check if the hours on given date don't combine to more + // than 8 + + // validate time + if (!int.TryParse(time, out int myInt) || myInt < 0 || myInt > 8) + throw new Exception("Incorect ammount of hours"); + // validate date + Regex regex = new Regex(@"^\d{4}-\d{2}-\d{2}$"); + if (string.IsNullOrEmpty(date) || !regex.IsMatch(date)) + { + throw new Exception("Incorrect date format"); + } + // validate user + // extract user from jwt + var handler = new JwtSecurityTokenHandler(); + var jwtToken = handler.ReadJwtToken(token); + string? usernameClaim = + jwtToken.Claims.FirstOrDefault(c => c.Type == "user")?.Value ?? ""; + if (string.IsNullOrEmpty(usernameClaim)) + { + throw new Exception("wrong user id"); + } + + // validate project + // TODO better project validation + if (string.IsNullOrEmpty(project)) + { + throw new Exception("wrong project"); + } + using (MySqlConnection conn = new MySqlConnection(connectionString)) + { + conn.Open(); + cmd.Connection = conn; + cmd.CommandText = + @"INSERT INTO Timelog(user,project,date,time) + VALUES(@user,@project,@date,@time);"; + cmd.Parameters.AddWithValue("@user", usernameClaim); + cmd.Parameters.AddWithValue("@project", project); + cmd.Parameters.AddWithValue("@time", time); + cmd.Parameters.AddWithValue("@date", date); + // execute query and read results + cmd.ExecuteNonQuery(); + + SendSuccess(response); } } - - public static void HandleRequest( - HttpListenerRequest request, - HttpListenerResponse response, - HttpListenerContext context - ) + catch (Exception ex) { - try - { - // check header - var headers = request.Headers; - string? token = headers["token"]; - if (!string.IsNullOrEmpty(token) && !ValidateToken(token)) - { - throw new Exception("Invalid token"); - } - // prepare SQL query - MySqlCommand cmd = new MySqlCommand(); - // extact data from body - string body; - using ( - StreamReader bodyReader = new StreamReader( - request.InputStream, - request.ContentEncoding - ) - ) - { - body = bodyReader.ReadToEnd(); - } - JObject jsonObject = JObject.Parse(body); - string project = jsonObject["project"]?.ToString() ?? ""; - string time = jsonObject["time"]?.ToString() ?? ""; - string date = jsonObject["date"]?.ToString() ?? ""; - - // TODO check if the hours on given date don't combine to more - // than 8 - - // validate time - if (!int.TryParse(time, out int myInt) || myInt < 0 || myInt > 8) - throw new Exception("Incorect ammount of hours"); - // validate date - Regex regex = new Regex(@"^\d{4}-\d{2}-\d{2}$"); - if (string.IsNullOrEmpty(date) || !regex.IsMatch(date)) - { - throw new Exception("Incorrect date format"); - } - // validate user - // extract user from jwt - var handler = new JwtSecurityTokenHandler(); - var jwtToken = handler.ReadJwtToken(token); - string? usernameClaim = - jwtToken.Claims.FirstOrDefault(c => c.Type == "user")?.Value ?? ""; - if (string.IsNullOrEmpty(usernameClaim)) - { - throw new Exception("wrong user id"); - } - - // validate project - // TODO better project validation - if (string.IsNullOrEmpty(project)) - { - throw new Exception("wrong project"); - } - using (MySqlConnection conn = new MySqlConnection(connectionString)) - { - conn.Open(); - cmd.Connection = conn; - cmd.CommandText = - @"INSERT INTO Timelog(user,project,date,time) - VALUES(@user,@project,@date,@time);"; - cmd.Parameters.AddWithValue("@user", usernameClaim); - cmd.Parameters.AddWithValue("@project", project); - cmd.Parameters.AddWithValue("@time", time); - cmd.Parameters.AddWithValue("@date", date); - // execute query and read results - cmd.ExecuteNonQuery(); - - SendSuccess(response); - } - } - catch (Exception ex) - { - SendError(response, ex); - } + SendError(response, ex); } } } diff --git a/backendCs/routes/CreateProcedure.cs b/backendCs/routes/CreateProcedure.cs index bc40a5b..6ecbb0a 100644 --- a/backendCs/routes/CreateProcedure.cs +++ b/backendCs/routes/CreateProcedure.cs @@ -1,22 +1,22 @@ using System.Net; using MySql.Data.MySqlClient; -namespace Server -{ - public class CreateProcedure : Route - { - public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response) - { - try - { - MySqlCommand cmd = new MySqlCommand(); +namespace Server; - using (MySqlConnection conn = new MySqlConnection(connectionString)) - { - conn.Open(); - cmd.Connection = conn; - cmd.CommandText = - @" +public class CreateProcedure : Route +{ + public static void HandleRequest(HttpListenerResponse response) + { + try + { + MySqlCommand cmd = new(); + + using (MySqlConnection conn = new(connectionString)) + { + conn.Open(); + cmd.Connection = conn; + cmd.CommandText = + @" CREATE PROCEDURE fill_timelog () BEGIN DECLARE j INT DEFAULT 1; @@ -53,9 +53,9 @@ BEGIN SET users = users + 1; END WHILE; END;"; - cmd.ExecuteNonQuery(); - cmd.CommandText = - @"CREATE PROCEDURE InitDB() + cmd.ExecuteNonQuery(); + cmd.CommandText = + @"CREATE PROCEDURE InitDB() BEGIN DECLARE i INT DEFAULT 1; TRUNCATE TABLE Timelog; @@ -116,15 +116,14 @@ BEGIN DROP TABLE temp_fname; DROP TABLE temp_lname; END;"; - cmd.ExecuteNonQuery(); - // prepare response - SendSuccess(response); - } - } - catch (Exception ex) - { - SendError(response, ex); + cmd.ExecuteNonQuery(); + // prepare response + SendSuccess(response); } } + catch (Exception ex) + { + SendError(response, ex); + } } } diff --git a/backendCs/routes/Getall.cs b/backendCs/routes/Getall.cs index bc5fc1b..9adb267 100644 --- a/backendCs/routes/Getall.cs +++ b/backendCs/routes/Getall.cs @@ -3,113 +3,112 @@ using System.Text.RegularExpressions; using MySql.Data.MySqlClient; using Newtonsoft.Json; -namespace Server -{ - // there should be a better way to deal with data comming from sql - public class Log - { - public object? f_name { get; set; } - public object? l_name { get; set; } - public object? mail { get; set; } - public object? name { get; set; } - public object? time { get; set; } - public object? date { get; set; } - public object? user { get; set; } - } +namespace Server; - public class Getall : Route +// there should be a better way to deal with data comming from sql +public class Log +{ + public object? f_name { get; set; } + public object? l_name { get; set; } + public object? mail { get; set; } + public object? name { get; set; } + public object? time { get; set; } + public object? date { get; set; } + public object? user { get; set; } +} + +public class Getall : Route +{ + public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response) { - public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response) + try { - try - { - // prepare SQL query - MySqlCommand cmd = new MySqlCommand(); - // get url params - var queryString = request.QueryString; - string? from = queryString["from"]; - string? to = queryString["to"]; - string? sortby = queryString["sortby"]; - string? offset = queryString["offset"]; - string? order = queryString["order"]; - order = order == "true" ? "ASC" : "DESC"; - string mainQuery = - @"SELECT u.f_name,u.l_name,u.mail,p.name,t.time,t.date,t.user + // prepare SQL query + MySqlCommand cmd = new(); + // get url params + var queryString = request.QueryString; + string? from = queryString["from"]; + string? to = queryString["to"]; + string? sortby = queryString["sortby"]; + string? offset = queryString["offset"]; + string? order = queryString["order"]; + order = order == "true" ? "ASC" : "DESC"; + string mainQuery = + @"SELECT u.f_name,u.l_name,u.mail,p.name,t.time,t.date,t.user FROM Timelog t INNER JOIN Project p ON p.id=t.project INNER JOIN User u ON u.id=t.user "; - // this shenanigan is needed to remove the "" around group by - string offsetQuery = " LIMIT 10 OFFSET " + offset + ";"; - // depending on the incoming parameters construct a Query - if (!string.IsNullOrEmpty(to) && !string.IsNullOrEmpty(from)) - { - Regex regex = new Regex(@"^\d{4}-\d{2}-\d{2}$"); - if (!regex.IsMatch(to) || !regex.IsMatch(from)) - { - throw new Exception("Incorrect date format"); - } - string whereQuery = " WHERE t.date BETWEEN @from AND @to "; - mainQuery = mainQuery + whereQuery; - } - if (!string.IsNullOrEmpty(sortby)) - { - List validSorting = new List - { - "f_name", - "l_name", - "mail", - "time", - "date", - "user", - "project", - }; - if (!validSorting.Contains(sortby)) - { - throw new Exception("Incorrect sorting value"); - } - string orderQuery = " ORDER BY " + sortby + " " + order; - mainQuery = mainQuery + orderQuery; - } - if (!int.TryParse(offset, out int myInt) || myInt < 0) - throw new Exception("Incorect offset"); - // add the final line to the query - cmd.CommandText = mainQuery + offsetQuery; - // those don't produce error if they don't find their variables - cmd.Parameters.AddWithValue("@from", from); - cmd.Parameters.AddWithValue("@to", to); - - using (MySqlConnection conn = new MySqlConnection(connectionString)) - { - conn.Open(); - cmd.Connection = conn; - // execute query and read results - MySqlDataReader reader = cmd.ExecuteReader(); - - List entries = new List(); - while (reader.Read()) - { - entries.Add( - new Log - { - f_name = reader["f_name"], - l_name = reader["l_name"], - user = reader["user"], - date = reader["date"], - name = reader["name"], - time = reader["time"], - mail = reader["mail"], - } - ); - } - // serialize JSON - string jsonResponse = JsonConvert.SerializeObject(entries); - SendSuccess(response, jsonResponse); - } - } - catch (Exception ex) + // this shenanigan is needed to remove the "" around group by + string offsetQuery = " LIMIT 10 OFFSET " + offset + ";"; + // depending on the incoming parameters construct a Query + if (!string.IsNullOrEmpty(to) && !string.IsNullOrEmpty(from)) { - SendError(response, ex); + Regex regex = new Regex(@"^\d{4}-\d{2}-\d{2}$"); + if (!regex.IsMatch(to) || !regex.IsMatch(from)) + { + throw new Exception("Incorrect date format"); + } + string whereQuery = " WHERE t.date BETWEEN @from AND @to "; + mainQuery = mainQuery + whereQuery; } + if (!string.IsNullOrEmpty(sortby)) + { + List validSorting = + [ + "f_name", + "l_name", + "mail", + "time", + "date", + "user", + "project", + ]; + if (!validSorting.Contains(sortby)) + { + throw new Exception("Incorrect sorting value"); + } + string orderQuery = " ORDER BY " + sortby + " " + order; + mainQuery = mainQuery + orderQuery; + } + if (!int.TryParse(offset, out int myInt) || myInt < 0) + throw new Exception("Incorect offset"); + // add the final line to the query + cmd.CommandText = mainQuery + offsetQuery; + // those don't produce error if they don't find their variables + cmd.Parameters.AddWithValue("@from", from); + cmd.Parameters.AddWithValue("@to", to); + + using (MySqlConnection conn = new(connectionString)) + { + conn.Open(); + cmd.Connection = conn; + // execute query and read results + MySqlDataReader reader = cmd.ExecuteReader(); + + List entries = []; + while (reader.Read()) + { + entries.Add( + new Log + { + f_name = reader["f_name"], + l_name = reader["l_name"], + user = reader["user"], + date = reader["date"], + name = reader["name"], + time = reader["time"], + mail = reader["mail"], + } + ); + } + // serialize JSON + string jsonResponse = JsonConvert.SerializeObject(entries); + SendSuccess(response, jsonResponse); + } + } + catch (Exception ex) + { + SendError(response, ex); } } } diff --git a/backendCs/routes/Gettopten.cs b/backendCs/routes/Gettopten.cs index dc07f62..f014a5f 100644 --- a/backendCs/routes/Gettopten.cs +++ b/backendCs/routes/Gettopten.cs @@ -3,101 +3,100 @@ using System.Text.RegularExpressions; using MySql.Data.MySqlClient; using Newtonsoft.Json; -namespace Server +namespace Server; + +public class TopTen { - public class TopTen - { - public object? user { get; set; } - public object? date { get; set; } - public object? project { get; set; } - public object? f_name { get; set; } - public object? l_name { get; set; } - public object? name { get; set; } - public object? total_time { get; set; } - } + public object? user { get; set; } + public object? date { get; set; } + public object? project { get; set; } + public object? f_name { get; set; } + public object? l_name { get; set; } + public object? name { get; set; } + public object? total_time { get; set; } +} - public class Gettopten : Route +public class Gettopten : Route +{ + public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response) { - public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response) + try { - try + // prepare SQL query + MySqlCommand cmd = new(); + var queryString = request.QueryString; + string? from = queryString["from"]; + string? to = queryString["to"]; + string? filterBy = queryString["filterBy"]; + + if (!string.IsNullOrEmpty(to) && !string.IsNullOrEmpty(from)) { - // prepare SQL query - MySqlCommand cmd = new MySqlCommand(); - var queryString = request.QueryString; - string? from = queryString["from"]; - string? to = queryString["to"]; - string? filterBy = queryString["filterBy"]; + Regex regex = new Regex(@"^\d{4}-\d{2}-\d{2}$"); + if (!regex.IsMatch(to) || !regex.IsMatch(from)) + { + throw new Exception("Incorrect date format"); + } + } + else + { + throw new Exception("Empty date format"); + } + if (string.IsNullOrEmpty(filterBy)) + { + throw new Exception("Empty filterby"); + } + if (filterBy != "user" && filterBy != "project") + { + throw new Exception("Incorrect filterby"); + } - if (!string.IsNullOrEmpty(to) && !string.IsNullOrEmpty(from)) - { - Regex regex = new Regex(@"^\d{4}-\d{2}-\d{2}$"); - if (!regex.IsMatch(to) || !regex.IsMatch(from)) - { - throw new Exception("Incorrect date format"); - } - } - else - { - throw new Exception("Empty date format"); - } - if (string.IsNullOrEmpty(filterBy)) - { - throw new Exception("Empty filterby"); - } - if (filterBy != "user" && filterBy != "project") - { - throw new Exception("Incorrect filterby"); - } - - // this shenanigan is needed to remove the "" around - // group by - string req = - @"SELECT t.user,t.date,t.project,u.f_name,u.l_name,p.name,SUM(t.time) as total_time + // this shenanigan is needed to remove the "" around + // group by + string req = + @"SELECT t.user,t.date,t.project,u.f_name,u.l_name,p.name,SUM(t.time) as total_time FROM Timelog t INNER JOIN Project p ON p.id=t.project INNER JOIN User u ON u.id=t.user WHERE t.date BETWEEN @from AND @to GROUP BY " - + filterBy - + @" ORDER BY total_time DESC + + filterBy + + @" ORDER BY total_time DESC LIMIT 10;"; - cmd.CommandText = req; - cmd.Parameters.AddWithValue("@from", from); - cmd.Parameters.AddWithValue("@to", to); + cmd.CommandText = req; + cmd.Parameters.AddWithValue("@from", from); + cmd.Parameters.AddWithValue("@to", to); - using (MySqlConnection conn = new MySqlConnection(connectionString)) - { - cmd.Connection = conn; - conn.Open(); - // Execute the query and read the results - MySqlDataReader reader = cmd.ExecuteReader(); - List entries = new List(); - while (reader.Read()) - { - entries.Add( - new TopTen - { - user = reader["user"], - date = reader["date"], - project = reader["project"], - f_name = reader["f_name"], - l_name = reader["l_name"], - name = reader["name"], - total_time = reader["total_time"], - } - ); - } - // Serialize the data to JSON - string jsonResponse = JsonConvert.SerializeObject(entries); - // prepare response - SendSuccess(response, jsonResponse); - } - } - catch (Exception ex) + using (MySqlConnection conn = new(connectionString)) { - SendError(response, ex); + cmd.Connection = conn; + conn.Open(); + // Execute the query and read the results + MySqlDataReader reader = cmd.ExecuteReader(); + List entries = []; + while (reader.Read()) + { + entries.Add( + new TopTen + { + user = reader["user"], + date = reader["date"], + project = reader["project"], + f_name = reader["f_name"], + l_name = reader["l_name"], + name = reader["name"], + total_time = reader["total_time"], + } + ); + } + // Serialize the data to JSON + string jsonResponse = JsonConvert.SerializeObject(entries); + // prepare response + SendSuccess(response, jsonResponse); } } + catch (Exception ex) + { + SendError(response, ex); + } } } diff --git a/backendCs/routes/Getuser.cs b/backendCs/routes/Getuser.cs index 50bc7e0..f8404ee 100644 --- a/backendCs/routes/Getuser.cs +++ b/backendCs/routes/Getuser.cs @@ -3,54 +3,55 @@ using System.Net; using MySql.Data.MySqlClient; using Newtonsoft.Json; -namespace Server +namespace Server; + +public class Getuser : Route { - public class Getuser : Route + public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response) { - public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response) + try { - try + var queryString = request.QueryString; + string? userid = queryString["userid"]; + if (string.IsNullOrEmpty(userid)) { - var queryString = request.QueryString; - string? userid = queryString["userid"]; - if (string.IsNullOrEmpty(userid)) - { - throw new Exception("Missing userid"); - } - // prepare SQL query - MySqlCommand cmd = new MySqlCommand(); - cmd.CommandText = + throw new Exception("Missing userid"); + } + // prepare SQL query + MySqlCommand cmd = new() + { + CommandText = @"SELECT p.name, SUM(t.time) FROM Timelog t INNER JOIN Project p ON p.id=t.project INNER JOIN User u ON u.id=t.user WHERE User = @userid - GROUP BY name;"; - cmd.Parameters.AddWithValue("@userid", userid); + GROUP BY name;", + }; + cmd.Parameters.AddWithValue("@userid", userid); - using (MySqlConnection conn = new MySqlConnection(connectionString)) - { - conn.Open(); - cmd.Connection = conn; - // execute query and read results - MySqlDataReader reader = cmd.ExecuteReader(); - dynamic expando = new ExpandoObject(); - while (reader.Read()) - { - ((IDictionary)expando)[reader["name"].ToString()] = reader[ - "SUM(t.time)" - ]; - } - // serialize JSON - string jsonResponse = JsonConvert.SerializeObject(expando); - // prepare response - SendSuccess(response, jsonResponse); - } - } - catch (Exception ex) + using (MySqlConnection conn = new(connectionString)) { - SendError(response, ex); + conn.Open(); + cmd.Connection = conn; + // execute query and read results + MySqlDataReader reader = cmd.ExecuteReader(); + dynamic expando = new ExpandoObject(); + while (reader.Read()) + { + ((IDictionary)expando)[reader["name"].ToString()] = reader[ + "SUM(t.time)" + ]; + } + // serialize JSON + string jsonResponse = JsonConvert.SerializeObject(expando); + // prepare response + SendSuccess(response, jsonResponse); } } + catch (Exception ex) + { + SendError(response, ex); + } } } diff --git a/backendCs/routes/Login.cs b/backendCs/routes/Login.cs index fab2f9a..4d98519 100644 --- a/backendCs/routes/Login.cs +++ b/backendCs/routes/Login.cs @@ -8,126 +8,122 @@ using MySql.Data.MySqlClient; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Server +namespace Server; + +public class Login : Route { - public class Login : Route + private static string secretKey = + "stronk-key-much-sercret-much-more-stronk-stronk-key-much-sercret-much-more-stronk"; + + public static string GenerateToken(string user) { - private static string secretKey = - "stronk-key-much-sercret-much-more-stronk-stronk-key-much-sercret-much-more-stronk"; + var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(secretKey)); + var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256); - public static string GenerateToken(string user) - { - var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(secretKey)); - var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256); + var token = new JwtSecurityToken( + issuer: "TimeLogServer", + audience: "TimeLogWebsite", + claims: new[] { new Claim("user", user) }, + expires: DateTime.Now.AddHours(2), + signingCredentials: creds + ); - var token = new JwtSecurityToken( - issuer: "TimeLogServer", - audience: "TimeLogWebsite", - claims: new[] { new Claim("user", user) }, - expires: DateTime.Now.AddHours(2), - signingCredentials: creds - ); + return new JwtSecurityTokenHandler().WriteToken(token); + } - return new JwtSecurityTokenHandler().WriteToken(token); - } + public static bool VerifyPassword(string enteredPassword, string storedHash) + { + byte[] hashBytes = Convert.FromBase64String(storedHash); - public static bool VerifyPassword(string enteredPassword, string storedHash) - { - byte[] hashBytes = Convert.FromBase64String(storedHash); + // Extract the salt from the stored hash + byte[] salt = new byte[16]; + Array.Copy(hashBytes, 0, salt, 0, 16); - // Extract the salt from the stored hash - byte[] salt = new byte[16]; - Array.Copy(hashBytes, 0, salt, 0, 16); - - // Hash the entered password with the stored salt - using ( - var pbkdf2 = new Rfc2898DeriveBytes( - enteredPassword, - salt, - 10000, - HashAlgorithmName.SHA256 - ) + // Hash the entered password with the stored salt + using ( + var pbkdf2 = new Rfc2898DeriveBytes( + enteredPassword, + salt, + 10000, + HashAlgorithmName.SHA256 ) - { - byte[] newHash = pbkdf2.GetBytes(32); - - // Compare the computed hash with the stored hash - for (int i = 0; i < 32; i++) - { - if (newHash[i] != hashBytes[i + 16]) - return false; - } - return true; - } - } - - public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response) + ) { - try - { - // extract data from body - string body; - using ( - StreamReader bodyReader = new StreamReader( - request.InputStream, - request.ContentEncoding - ) - ) - { - body = bodyReader.ReadToEnd(); - } - JObject jsonObject = JObject.Parse(body); - string mail = jsonObject["mail"]?.ToString() ?? ""; - string password = jsonObject["password"]?.ToString() ?? ""; + byte[] newHash = pbkdf2.GetBytes(32); - // prepare SQL query - MySqlCommand cmd = new MySqlCommand(); - cmd.CommandText = + // Compare the computed hash with the stored hash + for (int i = 0; i < 32; i++) + { + if (newHash[i] != hashBytes[i + 16]) + return false; + } + return true; + } + } + + public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response) + { + try + { + // extract data from body + string body; + using (StreamReader bodyReader = new(request.InputStream, request.ContentEncoding)) + { + body = bodyReader.ReadToEnd(); + } + JObject jsonObject = JObject.Parse(body); + string mail = jsonObject["mail"]?.ToString() ?? ""; + string password = jsonObject["password"]?.ToString() ?? ""; + + // prepare SQL query + MySqlCommand cmd = new() + { + CommandText = @"SELECT u.id, password FROM User u INNER JOIN Password p ON p.user=u.id - WHERE mail=@mail;"; - cmd.Parameters.AddWithValue("@mail", mail); + WHERE mail=@mail;", + }; + cmd.Parameters.AddWithValue("@mail", mail); - using (MySqlConnection conn = new MySqlConnection(connectionString)) - { - cmd.Connection = conn; - conn.Open(); - // execute query and read results - MySqlDataReader reader = cmd.ExecuteReader(); - string? userId = ""; - string? hashedPass = ""; - string? jsonResponse; - while (reader.Read()) - { - userId = Convert.ToString(reader["id"]); - hashedPass = reader.GetString("password"); - } - - // check username - if (string.IsNullOrEmpty(userId)) - { - throw new Exception("Invalid Username or Password"); - } - //check password - if ( - string.IsNullOrEmpty(password) - || string.IsNullOrEmpty(hashedPass) - || !VerifyPassword(password, hashedPass) - ) - { - throw new Exception("Invalid Username or Password"); - } - - jsonResponse = JsonConvert.SerializeObject(GenerateToken(userId)); - - // prepare response - SendSuccess(response, jsonResponse); - } - } - catch (Exception ex) + using (MySqlConnection conn = new(connectionString)) { - SendError(response, ex); + cmd.Connection = conn; + conn.Open(); + // execute query and read results + MySqlDataReader reader = cmd.ExecuteReader(); + string? userId = ""; + string? hashedPass = ""; + string? jsonResponse; + while (reader.Read()) + { + userId = Convert.ToString(reader["id"]); + hashedPass = reader.GetString("password"); + } + + // check username + if (string.IsNullOrEmpty(userId)) + { + throw new Exception("Invalid Username or Password"); + } + //check password + if ( + string.IsNullOrEmpty(password) + || string.IsNullOrEmpty(hashedPass) + || !VerifyPassword(password, hashedPass) + ) + { + throw new Exception("Invalid Username or Password"); + } + + jsonResponse = JsonConvert.SerializeObject(GenerateToken(userId)); + + // prepare response + SendSuccess(response, jsonResponse); } } + catch (Exception ex) + { + SendError(response, ex); + } } } diff --git a/backendCs/routes/Register.cs b/backendCs/routes/Register.cs index a08cf44..4006cd3 100644 --- a/backendCs/routes/Register.cs +++ b/backendCs/routes/Register.cs @@ -3,113 +3,102 @@ using System.Security.Cryptography; using MySql.Data.MySqlClient; using Newtonsoft.Json.Linq; -namespace Server +namespace Server; + +public class Register : Route { - public class Register : Route + private static string HashPassword(string password) { - private static string HashPassword(string password) + // Generate a salt + byte[] salt = new byte[16]; + RandomNumberGenerator.Fill(salt); + // Create a PBKDF2 instance to hash the password + using var pbkdf2 = new Rfc2898DeriveBytes(password, salt, 10000, HashAlgorithmName.SHA256); + byte[] hash = pbkdf2.GetBytes(32); + + // Combine the salt and the hash together + byte[] hashBytes = new byte[48]; // 16 (salt) + 32 (hash) + Array.Copy(salt, 0, hashBytes, 0, 16); + Array.Copy(hash, 0, hashBytes, 16, 32); + + // Return the final hash as a Base64 encoded string + return Convert.ToBase64String(hashBytes); + } + + public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response) + { + MySqlTransaction? transaction = null; + try { - // Generate a salt - byte[] salt = new byte[16]; - RandomNumberGenerator.Fill(salt); - // Create a PBKDF2 instance to hash the password - using ( - var pbkdf2 = new Rfc2898DeriveBytes(password, salt, 10000, HashAlgorithmName.SHA256) + // extract parameters from req body + string body; + using (StreamReader bodyReader = new(request.InputStream, request.ContentEncoding)) + { + body = bodyReader.ReadToEnd(); + } + JObject jsonObject = JObject.Parse(body); + string f_name = jsonObject["f_name"]?.ToString() ?? ""; + string l_name = jsonObject["l_name"]?.ToString() ?? ""; + string password = jsonObject["password"]?.ToString() ?? ""; + string mail = jsonObject["mail"]?.ToString() ?? ""; + + // validate parameters + if ( + string.IsNullOrEmpty(f_name) + || f_name.Length > 30 + || f_name.Length < 2 + || string.IsNullOrEmpty(l_name) + || l_name.Length > 30 + || l_name.Length < 2 + || string.IsNullOrEmpty(mail) + || mail.Length > 50 + || mail.Length < 6 + || string.IsNullOrEmpty(password) + || password.Length > 30 + || password.Length < 10 ) { - byte[] hash = pbkdf2.GetBytes(32); + throw new Exception("Wrong parameters"); + } + // open connection + // prepare SQL query + MySqlCommand cmd = new() + { + // Insert into User + CommandText = "INSERT INTO User(f_name,l_name,mail) VALUES(@f_name,@l_name,@mail)", + }; + cmd.Parameters.AddWithValue("@f_name", f_name); + cmd.Parameters.AddWithValue("@l_name", l_name); + cmd.Parameters.AddWithValue("@mail", mail); - // Combine the salt and the hash together - byte[] hashBytes = new byte[48]; // 16 (salt) + 32 (hash) - Array.Copy(salt, 0, hashBytes, 0, 16); - Array.Copy(hash, 0, hashBytes, 16, 32); + using (MySqlConnection conn = new(connectionString)) + { + conn.Open(); + transaction = conn.BeginTransaction(); + cmd.Connection = conn; + cmd.ExecuteNonQuery(); - // Return the final hash as a Base64 encoded string - return Convert.ToBase64String(hashBytes); + // Get user ID + cmd.CommandText = "SELECT id FROM User WHERE mail=@mail;"; + MySqlDataReader reader = cmd.ExecuteReader(); + reader.Read(); + var id = reader["id"]; + reader.Close(); + + // Insert into password + cmd.CommandText = "INSERT INTO Password(user,password) VALUES(@id,@password)"; + cmd.Parameters.AddWithValue("@password", HashPassword(password)); + cmd.Parameters.AddWithValue("@id", id); + cmd.ExecuteNonQuery(); + transaction.Commit(); + + SendSuccess(response); } } - - public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response) + catch (Exception ex) { - MySqlTransaction? transaction = null; - try - { - // extract parameters from req body - string body; - using ( - StreamReader bodyReader = new StreamReader( - request.InputStream, - request.ContentEncoding - ) - ) - { - body = bodyReader.ReadToEnd(); - } - JObject jsonObject = JObject.Parse(body); - string f_name = jsonObject["f_name"]?.ToString() ?? ""; - string l_name = jsonObject["l_name"]?.ToString() ?? ""; - string password = jsonObject["password"]?.ToString() ?? ""; - string mail = jsonObject["mail"]?.ToString() ?? ""; - - // validate parameters - if ( - string.IsNullOrEmpty(f_name) - || f_name.Length > 30 - || f_name.Length < 2 - || string.IsNullOrEmpty(l_name) - || l_name.Length > 30 - || l_name.Length < 2 - || string.IsNullOrEmpty(mail) - || mail.Length > 50 - || mail.Length < 6 - || string.IsNullOrEmpty(password) - || password.Length > 30 - || password.Length < 10 - ) - { - throw new Exception("Wrong parameters"); - } - // open connection - // prepare SQL query - MySqlCommand cmd = new MySqlCommand(); - - // Insert into User - cmd.CommandText = - "INSERT INTO User(f_name,l_name,mail) VALUES(@f_name,@l_name,@mail)"; - cmd.Parameters.AddWithValue("@f_name", f_name); - cmd.Parameters.AddWithValue("@l_name", l_name); - cmd.Parameters.AddWithValue("@mail", mail); - - using (MySqlConnection conn = new MySqlConnection(connectionString)) - { - conn.Open(); - transaction = conn.BeginTransaction(); - cmd.Connection = conn; - cmd.ExecuteNonQuery(); - - // Get user ID - cmd.CommandText = "SELECT id FROM User WHERE mail=@mail;"; - MySqlDataReader reader = cmd.ExecuteReader(); - reader.Read(); - var id = reader["id"]; - reader.Close(); - - // Insert into password - cmd.CommandText = "INSERT INTO Password(user,password) VALUES(@id,@password)"; - cmd.Parameters.AddWithValue("@password", HashPassword(password)); - cmd.Parameters.AddWithValue("@id", id); - cmd.ExecuteNonQuery(); - transaction.Commit(); - - SendSuccess(response); - } - } - catch (Exception ex) - { - if (transaction != null) - transaction.Rollback(); - SendError(response, ex); - } + transaction?.Rollback(); + SendError(response, ex); } } } diff --git a/backendCs/routes/Reset.cs b/backendCs/routes/Reset.cs index a9e53f6..b8d31a1 100644 --- a/backendCs/routes/Reset.cs +++ b/backendCs/routes/Reset.cs @@ -1,32 +1,30 @@ using System.Net; using MySql.Data.MySqlClient; -namespace Server +namespace Server; + +public class Reset : Route { - public class Reset : Route + public static void HandleRequest(HttpListenerResponse response) { - public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response) + try { - try + // prepare SQL query + MySqlCommand cmd = new() { CommandText = "CALL InitDB" }; + using (MySqlConnection conn = new MySqlConnection(connectionString)) { - // prepare SQL query - MySqlCommand cmd = new MySqlCommand(); - cmd.CommandText = "CALL InitDB"; - using (MySqlConnection conn = new MySqlConnection(connectionString)) - { - cmd.Connection = conn; - // open connection - conn.Open(); - // execute query - cmd.ExecuteNonQuery(); - // set up and send response - SendSuccess(response); - } - } - catch (Exception ex) - { - SendError(response, ex); + cmd.Connection = conn; + // open connection + conn.Open(); + // execute query + cmd.ExecuteNonQuery(); + // set up and send response + SendSuccess(response); } } + catch (Exception ex) + { + SendError(response, ex); + } } }