isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

fix(sites): unwrap result instead of returning #768

Closed seaerchin closed 1 year ago

seaerchin commented 1 year ago

Problem

Previously we weren't unwrapping the Result when we give a resp back to frontend, which results in an Object object. This leads to a error when we click the link to go to the live site.

Closes IS-199

Solution

  1. unwrap result

Tests

  1. go to the CMS
  2. login via email
  3. go to any site
  4. make an edit
  5. request a review and approve the PR (or just toggle state in db also ok)
  6. publish the site
  7. click on go to live site in the modal
  8. you should be directed to the live site