``` async buyPlayer(ownerId: string): Promise&lt...
# orm-help
m
Copy code
async buyPlayer(ownerId: string): Promise<void> {
    const previousTeam = await this.prismaService.team.findFirst({
      where: {
        ownerId,
      },
      include: {
        players: true,
      },
    })
    await this.prismaService.team.update({
      where: {
        ownerId,
      },
      data: {
        players: [...previousTeam.players],
      },
    })
  }