Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
PUBLIC
/
surfer-okd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ba93623c
authored
8 years ago
by
Johannes Zellner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cli help output
1 parent
f173d2d7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
cli/actions.js
cli/actions.js
View file @
ba93623
...
...
@@ -24,7 +24,7 @@ var gQuery = {};
function
checkConfig
()
{
if
(
!
config
.
server
()
||
!
config
.
accessToken
())
{
console
.
log
(
'
You have run "login" first'
);
console
.
log
(
'
Run %s first'
,
'surfer login'
.
yellow
);
process
.
exit
(
1
);
}
...
...
@@ -92,9 +92,9 @@ function login(uri) {
}
function
logout
()
{
checkConfig
(
);
if
(
!
config
.
accessToken
())
return
console
.
log
(
'Done'
.
green
);
superagent
.
post
(
config
.
server
()
+
'/api/logout'
).
query
(
gQuery
).
end
(
function
(
error
,
result
)
{
superagent
.
post
(
config
.
server
()
+
'/api/logout'
).
query
(
{
access_token
:
config
.
accessToken
()
}
).
end
(
function
(
error
,
result
)
{
if
(
result
&&
result
.
statusCode
!==
200
)
console
.
log
(
'Failed to logout: '
+
result
.
statusCode
);
if
(
error
)
console
.
log
(
error
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment