Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Whirlpool
whirlpool-client-cli
Commits
7f52b161
Commit
7f52b161
authored
Jul 02, 2020
by
zeroleak
Browse files
API: add POST /rest/cli/restart
parent
b037bbb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
doc/API.md
doc/API.md
+2
-0
src/main/java/com/samourai/whirlpool/cli/api/controllers/cli/CliController.java
...urai/whirlpool/cli/api/controllers/cli/CliController.java
+10
-0
src/main/java/com/samourai/whirlpool/cli/api/protocol/CliApiEndpoint.java
...m/samourai/whirlpool/cli/api/protocol/CliApiEndpoint.java
+1
-0
No files found.
doc/API.md
View file @
7f52b161
...
...
@@ -253,6 +253,8 @@ Payload:
}
```
### restart: ```POST /rest/cli/restart```
### get config: ```GET /rest/cli/config```
### set config: ```PUT /rest/cli/config```
...
...
src/main/java/com/samourai/whirlpool/cli/api/controllers/cli/CliController.java
View file @
7f52b161
...
...
@@ -100,4 +100,14 @@ public class CliController extends AbstractRestController {
// success
return
state
(
headers
);
}
@RequestMapping
(
value
=
CliApiEndpoint
.
REST_CLI_RESTART
,
method
=
RequestMethod
.
POST
)
public
ApiCliStateResponse
restart
(
@RequestHeader
HttpHeaders
headers
)
throws
Exception
{
checkHeaders
(
headers
);
Application
.
restart
();
// success
return
state
(
headers
);
}
}
src/main/java/com/samourai/whirlpool/cli/api/protocol/CliApiEndpoint.java
View file @
7f52b161
...
...
@@ -7,6 +7,7 @@ public class CliApiEndpoint {
public
static
final
String
REST_CLI_INIT
=
REST_PREFIX
+
"cli/init"
;
public
static
final
String
REST_CLI_LOGIN
=
REST_PREFIX
+
"cli/login"
;
public
static
final
String
REST_CLI_LOGOUT
=
REST_PREFIX
+
"cli/logout"
;
public
static
final
String
REST_CLI_RESTART
=
REST_PREFIX
+
"cli/restart"
;
public
static
final
String
REST_CLI_CONFIG
=
REST_PREFIX
+
"cli/config"
;
public
static
final
String
REST_POOLS
=
REST_PREFIX
+
"pools"
;
...
...
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