From 0f30200fcebad72b7700353214a526d854993554 Mon Sep 17 00:00:00 2001 From: Paulo Endoh Date: Mon, 3 Jun 2024 00:28:13 -0300 Subject: [PATCH] melhorias lolrates --- src/domains/lolrates/player/PlayerController.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/domains/lolrates/player/PlayerController.ts b/src/domains/lolrates/player/PlayerController.ts index 6931968..c436571 100644 --- a/src/domains/lolrates/player/PlayerController.ts +++ b/src/domains/lolrates/player/PlayerController.ts @@ -23,7 +23,10 @@ export class PlayerController { @CurrentUser({ required: true }) user: User, @Body() sentPlayer: Player ) { - const saved = await this.playerRepo.save(sentPlayer) + const saved = await this.playerRepo.save({ + ...sentPlayer, + userId: user.id, + }) return this.playerRepo.findOneFull(saved.id) } }