From 78034c6da73786f2f842d17f84556c3a76312c4a Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Wed, 25 Sep 2019 21:30:58 +0400 Subject: [PATCH] [backend] fix: Return instructor model itself instead of plain id when creating instructor --- Controllers/InstructorsDataController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controllers/InstructorsDataController.cs b/Controllers/InstructorsDataController.cs index 6ec9a6a..3688a68 100644 --- a/Controllers/InstructorsDataController.cs +++ b/Controllers/InstructorsDataController.cs @@ -43,7 +43,7 @@ namespace InstructorsListApp.Controllers instructor.Id = Guid.NewGuid().ToString(); databaseContext.Instructors.Add(instructor); databaseContext.SaveChanges(); - return Ok(instructor.Id); + return Ok(instructor); } return BadRequest(new Error(Error.PostBodyIsNotValid, "Given model isn't valid!")); }