From 5bf6fe9dbe98e0515cdf0e2dcfd8e63e85084c2c Mon Sep 17 00:00:00 2001 From: Oktawian-L Date: Sat, 9 Nov 2019 16:33:27 +0100 Subject: [PATCH] Roslyn comment Roslyn comment --- SubitonAPI/SubitonAPI/Controllers/PhotosController.cs | 5 +++-- SubitonAPI/SubitonAPI/Controllers/UsersController.cs | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SubitonAPI/SubitonAPI/Controllers/PhotosController.cs b/SubitonAPI/SubitonAPI/Controllers/PhotosController.cs index 72ea016..6ffe008 100644 --- a/SubitonAPI/SubitonAPI/Controllers/PhotosController.cs +++ b/SubitonAPI/SubitonAPI/Controllers/PhotosController.cs @@ -70,13 +70,14 @@ public PhotosController(DataContext context, IUserRepository userRepository, IMa [HttpPost] public async Task AddPhotoForUser(int userId, PhotoCreateDTO photo) { - _context.Photos.Add(photo); + /*_context.Photos.Add(photo); await _context.SaveChangesAsync().ConfigureAwait(true); if (photo == null) throw new ArgumentNullException(nameof(photo)); - return CreatedAtAction("GetPhoto", new { id = photo.Id }, photo); + return CreatedAtAction("GetPhoto", new { id = photo.Id }, photo);*/ + return Ok(); } diff --git a/SubitonAPI/SubitonAPI/Controllers/UsersController.cs b/SubitonAPI/SubitonAPI/Controllers/UsersController.cs index aafbd7d..58519c2 100644 --- a/SubitonAPI/SubitonAPI/Controllers/UsersController.cs +++ b/SubitonAPI/SubitonAPI/Controllers/UsersController.cs @@ -90,7 +90,6 @@ public async Task PutUser(int id, UserUpdateDTO userUpdate) } } - return NoContent(); } /* // POST: api/Users