|
|
@ -18,6 +18,9 @@ using IO.Swagger.Attributes; |
|
|
|
using IO.Swagger.Security; |
|
|
|
using IO.Swagger.Security; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using IO.Swagger.DTO; |
|
|
|
using IO.Swagger.DTO; |
|
|
|
|
|
|
|
using EPAServeur.Services; |
|
|
|
|
|
|
|
using EPAServeur.IServices; |
|
|
|
|
|
|
|
using EPAServeur.Models.Notes; |
|
|
|
|
|
|
|
|
|
|
|
namespace IO.Swagger.Controllers |
|
|
|
namespace IO.Swagger.Controllers |
|
|
|
{ |
|
|
|
{ |
|
|
@ -27,6 +30,13 @@ namespace IO.Swagger.Controllers |
|
|
|
[ApiController] |
|
|
|
[ApiController] |
|
|
|
public class NotesApiController : ControllerBase |
|
|
|
public class NotesApiController : ControllerBase |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
private readonly INoteService noteService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public NotesApiController(INoteService _noteService) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
noteService = _noteService; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// |
|
|
|
/// |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
@ -37,23 +47,25 @@ namespace IO.Swagger.Controllers |
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response> |
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response> |
|
|
|
[HttpDelete] |
|
|
|
[HttpDelete] |
|
|
|
[Route("/api/notes/{idNote}/supprimer")] |
|
|
|
[Route("/api/notes/{idNote}/supprimer")] |
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
//[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
[ValidateModelState] |
|
|
|
[ValidateModelState] |
|
|
|
[SwaggerOperation("DeleteNote")] |
|
|
|
[SwaggerOperation("DeleteNote")] |
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] |
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] |
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")] |
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")] |
|
|
|
public virtual IActionResult DeleteNote([FromRoute][Required]long? idNote) |
|
|
|
public virtual IActionResult DeleteNote([FromRoute][Required]long? idNote) |
|
|
|
{ |
|
|
|
{ |
|
|
|
//TODO: Uncomment the next line to return response 204 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
|
|
|
// return StatusCode(204); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
// return StatusCode(403, default(ErreurDTO)); |
|
|
|
// return StatusCode(403, default(ErreurDTO)); |
|
|
|
|
|
|
|
if(!noteService.SupprimerNote(idNote)) |
|
|
|
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
{ |
|
|
|
// return StatusCode(404, default(ErreurDTO)); |
|
|
|
ErreurDTO erreur = new ErreurDTO() |
|
|
|
|
|
|
|
{ |
|
|
|
throw new NotImplementedException(); |
|
|
|
Code = "404", |
|
|
|
|
|
|
|
Message = "Aucune note trouvé" |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
return NotFound(erreur); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
return NoContent(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -66,7 +78,7 @@ namespace IO.Swagger.Controllers |
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response> |
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("/api/notes/{idNote}")] |
|
|
|
[Route("/api/notes/{idNote}")] |
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
//[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
[ValidateModelState] |
|
|
|
[ValidateModelState] |
|
|
|
[SwaggerOperation("GetNoteById")] |
|
|
|
[SwaggerOperation("GetNoteById")] |
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(DetailsNoteDTO), description: "OK")] |
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(DetailsNoteDTO), description: "OK")] |
|
|
@ -74,21 +86,19 @@ namespace IO.Swagger.Controllers |
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")] |
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")] |
|
|
|
public virtual IActionResult GetNoteById([FromRoute][Required]long? idNote) |
|
|
|
public virtual IActionResult GetNoteById([FromRoute][Required]long? idNote) |
|
|
|
{ |
|
|
|
{ |
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
|
|
|
// return StatusCode(200, default(DetailsNoteDTO)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
// return StatusCode(403, default(ErreurDTO)); |
|
|
|
// return StatusCode(403, default(ErreurDTO)); |
|
|
|
|
|
|
|
DetailsNoteDTO note = noteService.GetNoteById(idNote); |
|
|
|
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
if(note == null) |
|
|
|
// return StatusCode(404, default(ErreurDTO)); |
|
|
|
{ |
|
|
|
string exampleJson = null; |
|
|
|
ErreurDTO erreur = new ErreurDTO() |
|
|
|
exampleJson = "{\n \"idAuteur\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateCreation\" : \"2000-01-23T04:56:07.000+00:00\",\n \"dateMiseAjour\" : \"2000-01-23T04:56:07.000+00:00\",\n \"titre\" : \"titre\",\n \"texte\" : \"texte\",\n \"id\" : 0,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n }\n}"; |
|
|
|
{ |
|
|
|
|
|
|
|
Code = "404", |
|
|
|
var example = exampleJson != null |
|
|
|
Message = "Aucune note n'a été trouvée" |
|
|
|
? JsonConvert.DeserializeObject<DetailsNoteDTO>(exampleJson) |
|
|
|
}; |
|
|
|
: default(DetailsNoteDTO); //TODO: Change the data returned |
|
|
|
return NotFound(erreur); |
|
|
|
return new ObjectResult(example); |
|
|
|
} |
|
|
|
|
|
|
|
return Ok(note); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -140,7 +150,7 @@ namespace IO.Swagger.Controllers |
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response> |
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("/api/notes/auteur/{idReferent}")] |
|
|
|
[Route("/api/notes/auteur/{idReferent}")] |
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
//[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
[ValidateModelState] |
|
|
|
[ValidateModelState] |
|
|
|
[SwaggerOperation("GetNotesByAuteur")] |
|
|
|
[SwaggerOperation("GetNotesByAuteur")] |
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(List<AffichageNoteDTO>), description: "OK")] |
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(List<AffichageNoteDTO>), description: "OK")] |
|
|
@ -148,21 +158,19 @@ namespace IO.Swagger.Controllers |
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")] |
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")] |
|
|
|
public virtual IActionResult GetNotesByAuteur([FromQuery][Required()]bool? asc, [FromRoute][Required]Guid? idReferent, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]string texte, [FromQuery]string tri) |
|
|
|
public virtual IActionResult GetNotesByAuteur([FromQuery][Required()]bool? asc, [FromRoute][Required]Guid? idReferent, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]string texte, [FromQuery]string tri) |
|
|
|
{ |
|
|
|
{ |
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
|
|
|
// return StatusCode(200, default(List<AffichageNoteDTO>)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
// return StatusCode(403, default(ErreurDTO)); |
|
|
|
// return StatusCode(403, default(ErreurDTO)); |
|
|
|
|
|
|
|
IEnumerable<AffichageNoteDTO> notes = noteService.GetNotesByAuteur(idReferent, asc, numPage, parPAge, texte, tri); |
|
|
|
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
if(notes == null) |
|
|
|
// return StatusCode(404, default(ErreurDTO)); |
|
|
|
{ |
|
|
|
string exampleJson = null; |
|
|
|
ErreurDTO erreur = new ErreurDTO() |
|
|
|
exampleJson = "[ {\n \"idCollaborateur\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateMiseAjour\" : \"2000-01-23T04:56:07.000+00:00\",\n \"titre\" : \"titre\",\n \"id\" : 0,\n \"collaborateur\" : \"collaborateur\"\n}, {\n \"idCollaborateur\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateMiseAjour\" : \"2000-01-23T04:56:07.000+00:00\",\n \"titre\" : \"titre\",\n \"id\" : 0,\n \"collaborateur\" : \"collaborateur\"\n} ]"; |
|
|
|
{ |
|
|
|
|
|
|
|
Code = "404", |
|
|
|
var example = exampleJson != null |
|
|
|
Message = "Aucun id ne correspond au référent" |
|
|
|
? JsonConvert.DeserializeObject<List<AffichageNoteDTO>>(exampleJson) |
|
|
|
}; |
|
|
|
: default(List<AffichageNoteDTO>); //TODO: Change the data returned |
|
|
|
return NotFound(erreur); |
|
|
|
return new ObjectResult(example); |
|
|
|
} |
|
|
|
|
|
|
|
return Ok(notes); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -181,7 +189,7 @@ namespace IO.Swagger.Controllers |
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response> |
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("/api/notes/auteur/{idReferent}/collaborateur/{idCollaborateur}")] |
|
|
|
[Route("/api/notes/auteur/{idReferent}/collaborateur/{idCollaborateur}")] |
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
//[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
[ValidateModelState] |
|
|
|
[ValidateModelState] |
|
|
|
[SwaggerOperation("GetNotesByCollaborateur")] |
|
|
|
[SwaggerOperation("GetNotesByCollaborateur")] |
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(List<AffichageNoteDTO>), description: "OK")] |
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(List<AffichageNoteDTO>), description: "OK")] |
|
|
@ -189,21 +197,19 @@ namespace IO.Swagger.Controllers |
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")] |
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")] |
|
|
|
public virtual IActionResult GetNotesByCollaborateur([FromQuery][Required()]bool? asc, [FromRoute][Required]Guid? idCollaborateur, [FromRoute][Required]Guid? idReferent, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]string texte, [FromQuery]string tri) |
|
|
|
public virtual IActionResult GetNotesByCollaborateur([FromQuery][Required()]bool? asc, [FromRoute][Required]Guid? idCollaborateur, [FromRoute][Required]Guid? idReferent, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]string texte, [FromQuery]string tri) |
|
|
|
{ |
|
|
|
{ |
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
|
|
|
// return StatusCode(200, default(List<AffichageNoteDTO>)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
// return StatusCode(403, default(ErreurDTO)); |
|
|
|
// return StatusCode(403, default(ErreurDTO)); |
|
|
|
|
|
|
|
IEnumerable<AffichageNoteDTO> notes = noteService.GetNotesByCollaborateur(idReferent, idCollaborateur, asc, numPage, parPAge, texte, tri); |
|
|
|
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
if (notes == null) |
|
|
|
// return StatusCode(404, default(ErreurDTO)); |
|
|
|
{ |
|
|
|
string exampleJson = null; |
|
|
|
ErreurDTO erreur = new ErreurDTO() |
|
|
|
exampleJson = "[ {\n \"idCollaborateur\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateMiseAjour\" : \"2000-01-23T04:56:07.000+00:00\",\n \"titre\" : \"titre\",\n \"id\" : 0,\n \"collaborateur\" : \"collaborateur\"\n}, {\n \"idCollaborateur\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateMiseAjour\" : \"2000-01-23T04:56:07.000+00:00\",\n \"titre\" : \"titre\",\n \"id\" : 0,\n \"collaborateur\" : \"collaborateur\"\n} ]"; |
|
|
|
{ |
|
|
|
|
|
|
|
Code = "404", |
|
|
|
var example = exampleJson != null |
|
|
|
Message = "Aucun id ne correspond au référent et/ou au collaborateur" |
|
|
|
? JsonConvert.DeserializeObject<List<AffichageNoteDTO>>(exampleJson) |
|
|
|
}; |
|
|
|
: default(List<AffichageNoteDTO>); //TODO: Change the data returned |
|
|
|
return NotFound(erreur); |
|
|
|
return new ObjectResult(example); |
|
|
|
} |
|
|
|
|
|
|
|
return Ok(notes); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -215,19 +221,16 @@ namespace IO.Swagger.Controllers |
|
|
|
/// <response code="403">Acces interdit</response> |
|
|
|
/// <response code="403">Acces interdit</response> |
|
|
|
[HttpPost] |
|
|
|
[HttpPost] |
|
|
|
[Route("/api/notes/nouvellenote")] |
|
|
|
[Route("/api/notes/nouvellenote")] |
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
//[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
[ValidateModelState] |
|
|
|
[ValidateModelState] |
|
|
|
[SwaggerOperation("NouvelleNote")] |
|
|
|
[SwaggerOperation("NouvelleNote")] |
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] |
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] |
|
|
|
public virtual IActionResult NouvelleNote([FromBody]DetailsNoteDTO body) |
|
|
|
public virtual IActionResult NouvelleNote([FromBody]DetailsNoteDTO body) |
|
|
|
{ |
|
|
|
{ |
|
|
|
//TODO: Uncomment the next line to return response 201 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
|
|
|
// return StatusCode(201); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
// return StatusCode(403, default(ErreurDTO)); |
|
|
|
// return StatusCode(403, default(ErreurDTO)); |
|
|
|
|
|
|
|
Note nouvelleNote = noteService.AjouterNote(body); |
|
|
|
throw new NotImplementedException(); |
|
|
|
return Created("",nouvelleNote); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -241,22 +244,21 @@ namespace IO.Swagger.Controllers |
|
|
|
/// <response code="403">Acces interdit</response> |
|
|
|
/// <response code="403">Acces interdit</response> |
|
|
|
[HttpPut] |
|
|
|
[HttpPut] |
|
|
|
[Route("/api/notes/{idNote}/updateNote")] |
|
|
|
[Route("/api/notes/{idNote}/updateNote")] |
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
//[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
[ValidateModelState] |
|
|
|
[ValidateModelState] |
|
|
|
[SwaggerOperation("UpdateNote")] |
|
|
|
[SwaggerOperation("UpdateNote")] |
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] |
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] |
|
|
|
public virtual IActionResult UpdateNote([FromBody]DetailsNoteDTO body, [FromRoute][Required]long? idNote) |
|
|
|
public virtual IActionResult UpdateNote([FromBody]DetailsNoteDTO body, [FromRoute][Required]long? idNote) |
|
|
|
{ |
|
|
|
{ |
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
|
|
|
// return StatusCode(200); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 201 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
|
|
|
// return StatusCode(201); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
// return StatusCode(403, default(ErreurDTO)); |
|
|
|
// return StatusCode(403, default(ErreurDTO)); |
|
|
|
|
|
|
|
|
|
|
|
throw new NotImplementedException(); |
|
|
|
Note note = noteService.UpdateNote(idNote, body); |
|
|
|
|
|
|
|
if (note == null) |
|
|
|
|
|
|
|
note = noteService.AjouterNote(body); |
|
|
|
|
|
|
|
return Ok(note); |
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 201 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
|
|
|
// return StatusCode(201); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|