({ launchId })
| 48 | } |
| 49 | |
| 50 | async bookTrip({ launchId }) { |
| 51 | const userId = this.context.user.id; |
| 52 | const res = await this.store.trips.findOrCreate({ |
| 53 | where: { userId, launchId }, |
| 54 | }); |
| 55 | return res && res.length ? res[0].get() : false; |
| 56 | } |
| 57 | |
| 58 | async cancelTrip({ launchId }) { |
| 59 | const userId = this.context.user.id; |