diff --git a/.vs/StudyLib/DesignTimeBuild/.dtbcache.v2 b/.vs/StudyLib/DesignTimeBuild/.dtbcache.v2 index 012535f..87bbaf3 100644 Binary files a/.vs/StudyLib/DesignTimeBuild/.dtbcache.v2 and b/.vs/StudyLib/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/StudyLib/v16/.suo b/.vs/StudyLib/v16/.suo index a5a9228..a20cafb 100644 Binary files a/.vs/StudyLib/v16/.suo and b/.vs/StudyLib/v16/.suo differ diff --git a/API/Controllers/SubjectsController.cs b/API/Controllers/SubjectsController.cs index 9c3d264..7997428 100644 --- a/API/Controllers/SubjectsController.cs +++ b/API/Controllers/SubjectsController.cs @@ -40,7 +40,11 @@ namespace StudyLib.API.Controllers return NotFound(); } - subject.EditedBy = userId; + if (subject.EditedBy == null) + { + subject.EditedBy = userId; + } + _context.Entry(subject).State = EntityState.Modified; await _context.SaveChangesAsync(); @@ -55,6 +59,7 @@ namespace StudyLib.API.Controllers return BadRequest(); } + subject.EditedBy = null; _context.Entry(subject).State = EntityState.Modified; foreach (var comment in subject.Comments) { diff --git a/bin/Debug/net5.0/StudyLib.dll b/bin/Debug/net5.0/StudyLib.dll index 61b81cb..7043295 100644 Binary files a/bin/Debug/net5.0/StudyLib.dll and b/bin/Debug/net5.0/StudyLib.dll differ diff --git a/bin/Debug/net5.0/StudyLib.pdb b/bin/Debug/net5.0/StudyLib.pdb index cd15ed5..f033e9c 100644 Binary files a/bin/Debug/net5.0/StudyLib.pdb and b/bin/Debug/net5.0/StudyLib.pdb differ diff --git a/obj/Debug/net5.0/StudyLib.dll b/obj/Debug/net5.0/StudyLib.dll index 61b81cb..7043295 100644 Binary files a/obj/Debug/net5.0/StudyLib.dll and b/obj/Debug/net5.0/StudyLib.dll differ diff --git a/obj/Debug/net5.0/StudyLib.pdb b/obj/Debug/net5.0/StudyLib.pdb index cd15ed5..f033e9c 100644 Binary files a/obj/Debug/net5.0/StudyLib.pdb and b/obj/Debug/net5.0/StudyLib.pdb differ