mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-11-26 00:05:39 +01:00
Document REST api
This commit is contained in:
parent
b982383b71
commit
d51e0bdb54
@ -114,6 +114,7 @@ impl Service for WebService {
|
||||
.with_header(ContentType::json())
|
||||
.with_body(file)
|
||||
}
|
||||
// Opens a file dialog and returns the path as a string
|
||||
(&Get, "/api/file-select") => {
|
||||
let file_dialog = nfd::open_pick_folder(None).unwrap();
|
||||
let file = match file_dialog {
|
||||
@ -130,6 +131,7 @@ impl Service for WebService {
|
||||
.with_header(ContentType::json())
|
||||
.with_body(file)
|
||||
}
|
||||
// Returns the default path for a installation
|
||||
(&Get, "/api/default-path") => {
|
||||
let path = self.framework.get_default_path();
|
||||
|
||||
@ -142,6 +144,7 @@ impl Service for WebService {
|
||||
.with_header(ContentType::json())
|
||||
.with_body(file)
|
||||
}
|
||||
// Immediately exits the application
|
||||
(&Get, "/api/exit") => {
|
||||
exit(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user