title: NestJS - How to properly update with TypeOrm
body: <p>I have this controller:</p>
  <pre><code>async reinstate(@Param() getSubscriptionDto: GetSubscriptionDto) {
          const reinstatedSubscription = await this.subscriptionsService.reinstateById(
              getSubscriptionDto.id
          )
          if (reinstatedSubscription.affected === 0) {
              throw new NotFoundException('Subscription not found')
          }
  
          return 204
      }
  </code></pre>
  <p>And the service:</p>
  <pre><code>const subscription = {
              id: subscriptionId,
              status: 'pass',
              cancelledAt: null,
          }
  
          return await this.subscriptionRepository.update(
              subscriptionId,
              subscription
          )
  </code></pre>
  <p>The update always returns object, which has &quot;affected&quot; property. As I have seen, if it makes an update value of affected is 1, and if I send non existing subscription, affected is 0.</p>
  <p>Thus in my controller I have this:</p>
  <pre><code> if (reinstatedSubscription.affected === 0) {
                  throw new NotFoundException('Subscription not found')
              }
  </code></pre>
  <p>It does work, but is this the only way of doing it?
  And additionally, how can I return no content response?</p>