Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
31d4173e
Commit
31d4173e
authored
Jan 13, 2016
by
Matthew Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change logout to do a POST request
parent
4821383d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
src/components/navigation/navigation.jsx
src/components/navigation/navigation.jsx
+7
-10
No files found.
src/components/navigation/navigation.jsx
View file @
31d4173e
...
@@ -4,7 +4,6 @@ var ReactIntl = require('react-intl');
...
@@ -4,7 +4,6 @@ var ReactIntl = require('react-intl');
var
defineMessages
=
ReactIntl
.
defineMessages
;
var
defineMessages
=
ReactIntl
.
defineMessages
;
var
FormattedMessage
=
ReactIntl
.
FormattedMessage
;
var
FormattedMessage
=
ReactIntl
.
FormattedMessage
;
var
injectIntl
=
ReactIntl
.
injectIntl
;
var
injectIntl
=
ReactIntl
.
injectIntl
;
var
xhr
=
require
(
'
xhr
'
);
var
Api
=
require
(
'
../../mixins/api.jsx
'
);
var
Api
=
require
(
'
../../mixins/api.jsx
'
);
var
Avatar
=
require
(
'
../avatar/avatar.jsx
'
);
var
Avatar
=
require
(
'
../avatar/avatar.jsx
'
);
...
@@ -151,16 +150,14 @@ var Navigation = React.createClass({
...
@@ -151,16 +150,14 @@ var Navigation = React.createClass({
},
},
handleLogOut
:
function
(
e
)
{
handleLogOut
:
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
xhr
({
this
.
api
({
host
:
''
,
host
:
''
,
uri
:
'
/accounts/logout/
'
method
:
'
post
'
,
},
function
(
err
)
{
uri
:
'
/accounts/logout/
'
,
if
(
err
)
{
useCsrf
:
true
log
.
error
(
err
);
},
function
(
err
,
body
)
{
}
else
{
if
(
err
)
return
;
this
.
closeLogin
();
if
(
body
)
log
.
warn
(
'
body found on logout
'
);
// shouldn't happen
window
.
refreshSession
();
}
}.
bind
(
this
));
}.
bind
(
this
));
},
},
handleAccountNavClick
:
function
(
e
)
{
handleAccountNavClick
:
function
(
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment