refractoring
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("backendCs.Test")]
|
||||
[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("backendCs.Test")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("backendCs.Test")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
d5818043832e259ded45b9771c78c909a325898a23799ca0c691beda0cd33197
|
||||
52cff86724d2fd2424e9f1d9a690fe3422a59e7c4c8fd9c4b99335b5ce7acb7f
|
||||
|
||||
+1
-1
@@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = backendCs.Test
|
||||
build_property.ProjectDir = /home/arch/projects/wip/timelog-interview-login/backendCs.Tests/
|
||||
build_property.ProjectDir = /home/arch/projects/unfinished/timelog-interview-login/backendCs.Tests/
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
|
||||
Binary file not shown.
@@ -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
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
d00baeaa72366c300b98f70a63e07318bcfbf2aac3aa8140adbf3514d041b139
|
||||
44ffb3de93f5803a95865b1f18602ffa1a9e69b6b29642e60dde4719a8b98d5a
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
namespace Server;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void HandleMissingPath(HttpListenerResponse response)
|
||||
@@ -19,7 +19,7 @@ namespace Server
|
||||
static void Main()
|
||||
{
|
||||
// create server
|
||||
HttpListener listener = new HttpListener();
|
||||
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/");
|
||||
@@ -50,7 +50,7 @@ namespace Server
|
||||
switch (uri)
|
||||
{
|
||||
case "/api/reset":
|
||||
Reset.HandleRequest(request, response);
|
||||
Reset.HandleRequest(response);
|
||||
break;
|
||||
case "/api/getall":
|
||||
/* Thread clientThread = new Thread(() => Getall.HandleRequest(request, response)); */
|
||||
@@ -64,7 +64,7 @@ namespace Server
|
||||
Getuser.HandleRequest(request, response);
|
||||
break;
|
||||
case "/api/createp":
|
||||
CreateProcedure.HandleRequest(request, response);
|
||||
CreateProcedure.HandleRequest(response);
|
||||
break;
|
||||
default:
|
||||
HandleMissingPath(response);
|
||||
@@ -100,4 +100,3 @@ namespace Server
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -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")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
21ebdfea2f4ecbc0e48a6b53f27fa496a20e08b7ed0ace43e5500d5093c8a245
|
||||
4d078ebec60178a78b052888e79c6e658ccc73953d1f8ba236008a06ecc632b9
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
cabec8eef32bfb7a5e67f2b4ed57839edd7c13e8479c77f87a2d35ec66b02abb
|
||||
6ce12d87876379d820297a17b33b1f57ff3987d74bed581fb7ebcc8c73660966
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -6,8 +6,8 @@ using Microsoft.IdentityModel.Tokens;
|
||||
using MySql.Data.MySqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
namespace Server;
|
||||
|
||||
public class CreateLog : Route
|
||||
{
|
||||
private static string secretKey =
|
||||
@@ -127,4 +127,3 @@ namespace Server
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
using System.Net;
|
||||
using MySql.Data.MySqlClient;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
namespace Server;
|
||||
|
||||
public class CreateProcedure : Route
|
||||
{
|
||||
public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response)
|
||||
public static void HandleRequest(HttpListenerResponse response)
|
||||
{
|
||||
try
|
||||
{
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
MySqlCommand cmd = new();
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(connectionString))
|
||||
using (MySqlConnection conn = new(connectionString))
|
||||
{
|
||||
conn.Open();
|
||||
cmd.Connection = conn;
|
||||
@@ -127,4 +127,3 @@ BEGIN
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ using System.Text.RegularExpressions;
|
||||
using MySql.Data.MySqlClient;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
namespace Server;
|
||||
|
||||
// there should be a better way to deal with data comming from sql
|
||||
public class Log
|
||||
{
|
||||
@@ -24,7 +24,7 @@ namespace Server
|
||||
try
|
||||
{
|
||||
// prepare SQL query
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
MySqlCommand cmd = new();
|
||||
// get url params
|
||||
var queryString = request.QueryString;
|
||||
string? from = queryString["from"];
|
||||
@@ -53,8 +53,8 @@ namespace Server
|
||||
}
|
||||
if (!string.IsNullOrEmpty(sortby))
|
||||
{
|
||||
List<string> validSorting = new List<string>
|
||||
{
|
||||
List<string> validSorting =
|
||||
[
|
||||
"f_name",
|
||||
"l_name",
|
||||
"mail",
|
||||
@@ -62,7 +62,7 @@ namespace Server
|
||||
"date",
|
||||
"user",
|
||||
"project",
|
||||
};
|
||||
];
|
||||
if (!validSorting.Contains(sortby))
|
||||
{
|
||||
throw new Exception("Incorrect sorting value");
|
||||
@@ -78,14 +78,14 @@ namespace Server
|
||||
cmd.Parameters.AddWithValue("@from", from);
|
||||
cmd.Parameters.AddWithValue("@to", to);
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(connectionString))
|
||||
using (MySqlConnection conn = new(connectionString))
|
||||
{
|
||||
conn.Open();
|
||||
cmd.Connection = conn;
|
||||
// execute query and read results
|
||||
MySqlDataReader reader = cmd.ExecuteReader();
|
||||
|
||||
List<Log> entries = new List<Log>();
|
||||
List<Log> entries = [];
|
||||
while (reader.Read())
|
||||
{
|
||||
entries.Add(
|
||||
@@ -112,4 +112,3 @@ namespace Server
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ using System.Text.RegularExpressions;
|
||||
using MySql.Data.MySqlClient;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
namespace Server;
|
||||
|
||||
public class TopTen
|
||||
{
|
||||
public object? user { get; set; }
|
||||
@@ -23,7 +23,7 @@ namespace Server
|
||||
try
|
||||
{
|
||||
// prepare SQL query
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
MySqlCommand cmd = new();
|
||||
var queryString = request.QueryString;
|
||||
string? from = queryString["from"];
|
||||
string? to = queryString["to"];
|
||||
@@ -66,13 +66,13 @@ namespace Server
|
||||
cmd.Parameters.AddWithValue("@from", from);
|
||||
cmd.Parameters.AddWithValue("@to", to);
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(connectionString))
|
||||
using (MySqlConnection conn = new(connectionString))
|
||||
{
|
||||
cmd.Connection = conn;
|
||||
conn.Open();
|
||||
// Execute the query and read the results
|
||||
MySqlDataReader reader = cmd.ExecuteReader();
|
||||
List<TopTen> entries = new List<TopTen>();
|
||||
List<TopTen> entries = [];
|
||||
while (reader.Read())
|
||||
{
|
||||
entries.Add(
|
||||
@@ -100,4 +100,3 @@ namespace Server
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ using System.Net;
|
||||
using MySql.Data.MySqlClient;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
namespace Server;
|
||||
|
||||
public class Getuser : Route
|
||||
{
|
||||
public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response)
|
||||
@@ -18,17 +18,19 @@ namespace Server
|
||||
throw new Exception("Missing userid");
|
||||
}
|
||||
// prepare SQL query
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
cmd.CommandText =
|
||||
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;";
|
||||
GROUP BY name;",
|
||||
};
|
||||
cmd.Parameters.AddWithValue("@userid", userid);
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(connectionString))
|
||||
using (MySqlConnection conn = new(connectionString))
|
||||
{
|
||||
conn.Open();
|
||||
cmd.Connection = conn;
|
||||
@@ -53,4 +55,3 @@ namespace Server
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ using MySql.Data.MySqlClient;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
namespace Server;
|
||||
|
||||
public class Login : Route
|
||||
{
|
||||
private static string secretKey =
|
||||
@@ -67,12 +67,7 @@ namespace Server
|
||||
{
|
||||
// extract data from body
|
||||
string body;
|
||||
using (
|
||||
StreamReader bodyReader = new StreamReader(
|
||||
request.InputStream,
|
||||
request.ContentEncoding
|
||||
)
|
||||
)
|
||||
using (StreamReader bodyReader = new(request.InputStream, request.ContentEncoding))
|
||||
{
|
||||
body = bodyReader.ReadToEnd();
|
||||
}
|
||||
@@ -81,14 +76,16 @@ namespace Server
|
||||
string password = jsonObject["password"]?.ToString() ?? "";
|
||||
|
||||
// prepare SQL query
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
cmd.CommandText =
|
||||
MySqlCommand cmd = new()
|
||||
{
|
||||
CommandText =
|
||||
@"SELECT u.id, password FROM User u
|
||||
INNER JOIN Password p ON p.user=u.id
|
||||
WHERE mail=@mail;";
|
||||
WHERE mail=@mail;",
|
||||
};
|
||||
cmd.Parameters.AddWithValue("@mail", mail);
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(connectionString))
|
||||
using (MySqlConnection conn = new(connectionString))
|
||||
{
|
||||
cmd.Connection = conn;
|
||||
conn.Open();
|
||||
@@ -130,4 +127,3 @@ namespace Server
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ using System.Security.Cryptography;
|
||||
using MySql.Data.MySqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
namespace Server;
|
||||
|
||||
public class Register : Route
|
||||
{
|
||||
private static string HashPassword(string password)
|
||||
@@ -13,10 +13,7 @@ namespace Server
|
||||
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)
|
||||
)
|
||||
{
|
||||
using var pbkdf2 = new Rfc2898DeriveBytes(password, salt, 10000, HashAlgorithmName.SHA256);
|
||||
byte[] hash = pbkdf2.GetBytes(32);
|
||||
|
||||
// Combine the salt and the hash together
|
||||
@@ -27,7 +24,6 @@ namespace Server
|
||||
// Return the final hash as a Base64 encoded string
|
||||
return Convert.ToBase64String(hashBytes);
|
||||
}
|
||||
}
|
||||
|
||||
public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response)
|
||||
{
|
||||
@@ -36,12 +32,7 @@ namespace Server
|
||||
{
|
||||
// extract parameters from req body
|
||||
string body;
|
||||
using (
|
||||
StreamReader bodyReader = new StreamReader(
|
||||
request.InputStream,
|
||||
request.ContentEncoding
|
||||
)
|
||||
)
|
||||
using (StreamReader bodyReader = new(request.InputStream, request.ContentEncoding))
|
||||
{
|
||||
body = bodyReader.ReadToEnd();
|
||||
}
|
||||
@@ -71,16 +62,16 @@ namespace Server
|
||||
}
|
||||
// open connection
|
||||
// prepare SQL query
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
|
||||
MySqlCommand cmd = new()
|
||||
{
|
||||
// Insert into User
|
||||
cmd.CommandText =
|
||||
"INSERT INTO User(f_name,l_name,mail) VALUES(@f_name,@l_name,@mail)";
|
||||
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))
|
||||
using (MySqlConnection conn = new(connectionString))
|
||||
{
|
||||
conn.Open();
|
||||
transaction = conn.BeginTransaction();
|
||||
@@ -106,10 +97,8 @@ namespace Server
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (transaction != null)
|
||||
transaction.Rollback();
|
||||
transaction?.Rollback();
|
||||
SendError(response, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
using System.Net;
|
||||
using MySql.Data.MySqlClient;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
namespace Server;
|
||||
|
||||
public class Reset : Route
|
||||
{
|
||||
public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response)
|
||||
public static void HandleRequest(HttpListenerResponse response)
|
||||
{
|
||||
try
|
||||
{
|
||||
// prepare SQL query
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
cmd.CommandText = "CALL InitDB";
|
||||
MySqlCommand cmd = new() { CommandText = "CALL InitDB" };
|
||||
using (MySqlConnection conn = new MySqlConnection(connectionString))
|
||||
{
|
||||
cmd.Connection = conn;
|
||||
@@ -29,4 +28,3 @@ namespace Server
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user