Skip to content

Commit

Permalink
fix: coupon redeem code
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Nov 15, 2023
1 parent 28110a4 commit 883d0e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions problems/1-space-out/problem.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ When you call login, the script will wait until you click on the link in the ema

```js
// click the link in the email, but selecting a payment plan is optional,
// because the account funding your space is provided for you! \o/
// because the coupon is funding your space! \o/
const myAccount = await client.login('your@email')

// fetch the account information
const res = await fetch('https://url-provided-to-you')
const data = new Uint8Array(await res.arrayBuffer())

// provision the space with the provided coupon
const coupon = await client.extractCoupon(data)
await coupon.provision(permission)
const access = await client.coupon.redeem(data)
await space.provision(access)
```

Once provisioned, it's a really good idea to setup recovery, so that when you move to a different device you can still access your space:
Expand Down

0 comments on commit 883d0e5

Please sign in to comment.