mirror of
https://github.com/ChronosX88/InstructorsListAppTA.git
synced 2024-12-04 14:42:18 +00:00
[backend] fix: Return instructor model itself instead of plain id when creating instructor
This commit is contained in:
parent
e9f11bd288
commit
78034c6da7
@ -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!"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user