[backend] fix: Return instructor model itself instead of plain id when creating instructor

This commit is contained in:
ChronosX88 2019-09-25 21:30:58 +04:00
parent e9f11bd288
commit 78034c6da7
Signed by: ChronosXYZ
GPG Key ID: 085A69A82C8C511A

View File

@ -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!"));
}