~girishm/op-mattermost

d483861caa449da3a62602e683a6bc5aa0dd04ab — girishm a month ago 395af5e
1. update demo 2. handle invalid op auth error
4 files changed, 9 insertions(+), 3 deletions(-)

M README.md
D resource/op-mattermost-demo-v0.6.gif
A resource/op-mattermost-demo-v0.7.gif
M resource/uiActions.js
M README.md => README.md +1 -1
@@ 9,7 9,7 @@

## Demo

![Demo video](resource/op-mattermost-demo-v0.6.gif) recorded using [Peek](https://github.com/phw/peek).
![Demo video](resource/op-mattermost-demo-v0.7.gif) recorded using [Peek](https://github.com/phw/peek).

## Dependencies


D resource/op-mattermost-demo-v0.6.gif => resource/op-mattermost-demo-v0.6.gif +0 -0
A resource/op-mattermost-demo-v0.7.gif => resource/op-mattermost-demo-v0.7.gif +0 -0
M resource/uiActions.js => resource/uiActions.js +8 -2
@@ 64,8 64,14 @@ class UIactions {
      console.log("optArray for projects", projectOptJSON);
      res.set('Content-Type', 'application/json').send(JSON.stringify(projectOptJSON)).status(200);
    }).catch(error => {
      console.log("Error in getting projects from OP", error.response.data.message);
      res.send("Open Project server down!!").status(500);
      if(error.response.status === 401) {
        console.log("Unauthorized: ", error.response.data.message);
        res.send("**Unauthorized. Invalid OpenProject access token**").status(401);
      }
      else {
        console.log("Error in getting projects from OP", error.response.data.message);
        res.send("**Open Project server down!!**").status(500);
      }
      return false;
    });
  }