public async Task <IActionResult> Create([FromBody] Notes notes) { if (ModelState.IsValid) { return(Ok(await _noteService.AddNewNotes(notes))); } else { return(BadRequest(new { Success = false, Message = "Please enter all fields correctly" })); } }
public async Task <IActionResult> Create([FromBody] Notes notes) { if (ModelState.IsValid) { return(Ok(await _noteService.AddNewNotes(notes))); } else { return(BadRequest(new { Success = false, Message = "Please enter all fields correctly" })); } }