mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Fix server.
This commit is contained in:
parent
8b9f2d9655
commit
4424db7e0c
1 changed files with 7 additions and 3 deletions
|
@ -124,6 +124,11 @@ class KobaltServer(val force: Boolean, val port: Int = 1234,
|
|||
property(ServerProperties.TRACING, "ALL")
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("ping")
|
||||
@Produces(MediaType.TEXT_PLAIN)
|
||||
fun getDependencies() = "pong"
|
||||
|
||||
@GET
|
||||
@Path("getDependencies")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
@ -134,9 +139,8 @@ class KobaltServer(val force: Boolean, val port: Int = 1234,
|
|||
|
||||
val projects = initCallback(buildFile)
|
||||
val dd = dependencyData.dependenciesDataFor(buildFile, args)
|
||||
val data = CommandData("getDependencies", Gson().toJson(dd), dd.errorMessage)
|
||||
|
||||
return Gson().toJson(data)
|
||||
val result = Gson().toJson(dd)
|
||||
return result
|
||||
} catch(ex: Exception) {
|
||||
return "Error: " + ex.message
|
||||
} finally {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue