From af415e1bf3c49d80cafacc3d9376b1774aca92f6 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Thu, 22 Oct 2015 17:17:27 -0400 Subject: [PATCH] Set template cue to dismiss welcome panel --- server/proxies.json | 1 + src/views/splash/splash.jsx | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/server/proxies.json b/server/proxies.json index 354a9cb4e..ffff8ca4c 100644 --- a/server/proxies.json +++ b/server/proxies.json @@ -7,5 +7,6 @@ "/login_retry/", "/media/", "/session/", + "/site-api", "/static/" ] diff --git a/src/views/splash/splash.jsx b/src/views/splash/splash.jsx index c8af630b2..f87ddeb97 100644 --- a/src/views/splash/splash.jsx +++ b/src/views/splash/splash.jsx @@ -88,8 +88,16 @@ var Splash = injectIntl(React.createClass({ if (!err) this.setState({projectCount: body.count}); }.bind(this)); }, - handleDismiss: function (flag) { - // TODO: Call flag setting xhr + handleDismiss: function (cue) { + this.api({ + host: '', + uri: '/site-api/users/set-template-cue/', + method: 'post', + useCsrf: true, + json: {cue: cue, value: false} + }, function (err) { + if (!err) window.refreshSession(); + }); }, renderHomepageRows: function () { var formatMessage = this.props.intl.formatMessage;