🔨 CreatePlayer
continuous-integration/drone/push Build is passing Details

pull/7/head
Noan07 2 years ago
parent 5397ff039f
commit 1d80ebd11f

@ -108,7 +108,7 @@ namespace ApiLeapHit.Controllers
[HttpGet("Player/{id}")]
public async Task<ActionResult<List<DTOChat>>> GetChatsByIdPlayer(int id)
public async Task<ActionResult<List<DTOChat>>> GetChatsByIdPlayer(string id)
{
try
{
@ -135,7 +135,7 @@ namespace ApiLeapHit.Controllers
}
[HttpGet("Players/{idPlayer1}/{idPlayer2}")]
public async Task<ActionResult<List<DTOChat>>> GetChatsByIdPlayers(int idPlayer1, int idPlayer2)
public async Task<ActionResult<List<DTOChat>>> GetChatsByIdPlayers(string idPlayer1, string idPlayer2)
{
try
{

@ -95,7 +95,7 @@ namespace ApiLeapHit.Controllers
//}
[HttpGet("Player/{id}")]
public async Task<ActionResult<IEnumerable<DTOGame>>> GetGameByIdPlayer(int id)
public async Task<ActionResult<IEnumerable<DTOGame>>> GetGameByIdPlayer(string id)
{
try
{

@ -22,11 +22,15 @@ namespace ApiLeapHit.Controllers
_logger = logger;
}
[HttpPost]
public async Task<ActionResult<ApiResponse<string>>> CreatePlayer()
[HttpGet("/clePlayer/{idIdentification}")]
public async Task<ActionResult<ApiResponse<string>>> CreatePlayer(string idIdentification)
{
try
{
if(!idIdentification.Equals("K02q7naLzjmodzAFfoSO4mPydr7W5hydPMrHtA6D"))
{
return StatusCode((int)HttpStatusCode.NotFound, new ApiResponse("Le numéo n'est pas correct."));
}
var player = new Player();
string id;
do

@ -14,8 +14,8 @@ namespace ApiLeapHit.Mapper
nbMaxEchanges = game.nbMaxEchanges,
playerWinner = game.winner,
playerLoser = game.loser,
scoreLoser = game.loser,
scoreWinner = game.winner
scoreLoser = game.scoreLoser,
scoreWinner = game.scoreWinner
};
return dtoGame;
}

Loading…
Cancel
Save