diff --git a/HistoryContest.Server/Controllers/APIs/CounselorController.cs b/HistoryContest.Server/Controllers/APIs/CounselorController.cs index 7565d9f..7dab1df 100644 --- a/HistoryContest.Server/Controllers/APIs/CounselorController.cs +++ b/HistoryContest.Server/Controllers/APIs/CounselorController.cs @@ -16,7 +16,7 @@ namespace HistoryContest.Server.Controllers.APIs { [Authorize(Roles = "Counselor, Administrator")] - [ValidateAntiForgeryToken] + //[ValidateAntiForgeryToken] [Produces("application/json")] [Route("api/[controller]")] public class CounselorController : Controller diff --git a/HistoryContest.Server/Controllers/APIs/QuestionController.cs b/HistoryContest.Server/Controllers/APIs/QuestionController.cs index 44d11e2..146ca4d 100644 --- a/HistoryContest.Server/Controllers/APIs/QuestionController.cs +++ b/HistoryContest.Server/Controllers/APIs/QuestionController.cs @@ -14,7 +14,7 @@ namespace HistoryContest.Server.Controllers.APIs { [Authorize(Roles = "Student, Administrator")] - [ValidateAntiForgeryToken] + //[ValidateAntiForgeryToken] [Produces("application/json")] [Route("api/[controller]")] public class QuestionController : Controller diff --git a/HistoryContest.Server/Controllers/APIs/ResultController.cs b/HistoryContest.Server/Controllers/APIs/ResultController.cs index e16ea1e..eed7574 100644 --- a/HistoryContest.Server/Controllers/APIs/ResultController.cs +++ b/HistoryContest.Server/Controllers/APIs/ResultController.cs @@ -18,7 +18,7 @@ namespace HistoryContest.Server.Controllers.APIs { [Authorize] - [ValidateAntiForgeryToken] + //[ValidateAntiForgeryToken] [Produces("application/json")] [Route("api/[controller]")] public class ResultController : Controller diff --git a/HistoryContest.Server/Controllers/APIs/StudentController.cs b/HistoryContest.Server/Controllers/APIs/StudentController.cs index cfeb660..57ac92c 100644 --- a/HistoryContest.Server/Controllers/APIs/StudentController.cs +++ b/HistoryContest.Server/Controllers/APIs/StudentController.cs @@ -14,7 +14,7 @@ namespace HistoryContest.Server.Controllers.APIs { [Authorize(Roles = "Student, Administrator")] - [ValidateAntiForgeryToken] + //[ValidateAntiForgeryToken] [Produces("application/json")] [Route("api/[controller]")] public class StudentController : Controller diff --git a/HistoryContest.Server/Data/UnitOfWork.cs b/HistoryContest.Server/Data/UnitOfWork.cs index b35335b..df745c2 100644 --- a/HistoryContest.Server/Data/UnitOfWork.cs +++ b/HistoryContest.Server/Data/UnitOfWork.cs @@ -76,6 +76,7 @@ public async Task SaveCacheToDataBase() } await DbContext.SaveChangesAsync(); var studentIDs = await Cache.Database.ListRangeAsync("StudentIDsToUpdate"); + await Cache.Database.KeyDeleteAsync("StudentIDsToUpdate"); var studentTasks = studentIDs.Select(async ID => await Cache.StudentEntities(ID.ToString().ToDepartmentID()).GetAsync(ID)); foreach (var studentTask in studentTasks) { diff --git a/HistoryContest.Server/HistoryContest.sln b/HistoryContest.Server/HistoryContest.sln deleted file mode 100644 index d8ce657..0000000 --- a/HistoryContest.Server/HistoryContest.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26730.8 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HistoryContest.Server", "HistoryContest.Server\HistoryContest.Server.csproj", "{0F8705F9-D0E1-4B27-B894-C7E3BC9EA0F8}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HistoryContest.Test", "HistoryContest.Test\HistoryContest.Test.csproj", "{B51B5499-C58C-402C-9C41-1D09DE89455F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0F8705F9-D0E1-4B27-B894-C7E3BC9EA0F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0F8705F9-D0E1-4B27-B894-C7E3BC9EA0F8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0F8705F9-D0E1-4B27-B894-C7E3BC9EA0F8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0F8705F9-D0E1-4B27-B894-C7E3BC9EA0F8}.Release|Any CPU.Build.0 = Release|Any CPU - {B51B5499-C58C-402C-9C41-1D09DE89455F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B51B5499-C58C-402C-9C41-1D09DE89455F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B51B5499-C58C-402C-9C41-1D09DE89455F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B51B5499-C58C-402C-9C41-1D09DE89455F}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {9D073CA6-A091-46A5-AAFB-4E20495BDD47} - EndGlobalSection -EndGlobal diff --git a/XUnitTest/TextFixture.cs b/HistoryContest.Test/TextFixture.cs similarity index 100% rename from XUnitTest/TextFixture.cs rename to HistoryContest.Test/TextFixture.cs