diff options
author | LarsVomMars | 2019-06-07 21:53:38 +0200 |
---|---|---|
committer | LarsVomMars | 2019-06-07 21:53:38 +0200 |
commit | a34a0d45da548bef8b18da04d2947fb0ff0edae0 (patch) | |
tree | e7917be6d15f0063a4e86f0a38be96f59417c8ec /src/main/kotlin/App.kt | |
parent | b53ce4dac1429118888297989ec0746ec9e0fd0c (diff) |
Added /file/ prefix to all routes used for file like actions
Signed-off-by: LarsVomMars <lars@kroenner.eu>
Diffstat (limited to 'src/main/kotlin/App.kt')
-rw-r--r-- | src/main/kotlin/App.kt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/kotlin/App.kt b/src/main/kotlin/App.kt index b6b5a14..181149d 100644 --- a/src/main/kotlin/App.kt +++ b/src/main/kotlin/App.kt @@ -12,7 +12,7 @@ import org.slf4j.* import java.net.* import kotlin.system.* -const val debug = false +const val debug = true var silent = true var port = 7000 // TODO: Add abstract and secure file home support for windows/BSD/macOS @@ -146,32 +146,32 @@ fun main(args: Array<String>) { /** * Receives and saves multipart media data */ - post("/upload/*", fileController::upload, roles(Roles.USER)) + post("/file/upload/*", fileController::upload, roles(Roles.USER)) /** * Indexes every file of the user into the database */ - get("/index", fileController::indexAll, roles(Roles.USER)) + get("/file/index", fileController::indexAll, roles(Roles.USER)) /** * Deletes file */ - post("/delete/*", fileController::delete, roles(Roles.USER)) + post("/file/delete/*", fileController::delete, roles(Roles.USER)) /** * Shares file */ - post("/share/*", fileController::share, roles(Roles.USER)) + post("/file/share/*", fileController::share, roles(Roles.USER)) /** * Shares file in directory */ - post("/share", fileController::handleSharedFile, roles(Roles.USER)) + post("/file/share", fileController::handleSharedFile, roles(Roles.USER)) /** * Shows the shared file */ - get("/shared", fileController::renderShared, roles(Roles.GUEST, Roles.USER)) + get("/file/shared", fileController::renderShared, roles(Roles.GUEST, Roles.USER)) } } |