async destroy({ params, response }) {
    const property = await Property.findOrFail(params.id);

    if (property.user_id !== auth.user.id) {
      return response.status(401).send({ error: "Not authorized" });
    }

    await property.delete();
  }
/**
   * Delete a property with id.
   * DELETE properties/:id
   */
Delete a property with id.
DELETE properties/:id
Delete a property with id . DELETE properties / : id
async destroy({ params, response }) {
    const property = await Property.findOrFail(params.id);
    if (property.user_id !== auth.user.id) {
      return response.status(401).send({ error: "Not authorized" });
    }
    await property.delete();
  }
async destroy ( { params , response } ) { const property = await Property . findOrFail ( params . id ) ; if ( property . user_id !== auth . user . id ) { return response . status ( 401 ) . send ( { error : "Not authorized" } ) ; } await property . delete ( ) ; }
Delete a property with id.
Delete a property with id .