1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Fix server.

This commit is contained in:
Cedric Beust 2016-04-27 21:30:04 -08:00
parent 8b9f2d9655
commit 4424db7e0c

View file

@ -124,6 +124,11 @@ class KobaltServer(val force: Boolean, val port: Int = 1234,
property(ServerProperties.TRACING, "ALL") property(ServerProperties.TRACING, "ALL")
} }
@GET
@Path("ping")
@Produces(MediaType.TEXT_PLAIN)
fun getDependencies() = "pong"
@GET @GET
@Path("getDependencies") @Path("getDependencies")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -134,9 +139,8 @@ class KobaltServer(val force: Boolean, val port: Int = 1234,
val projects = initCallback(buildFile) val projects = initCallback(buildFile)
val dd = dependencyData.dependenciesDataFor(buildFile, args) val dd = dependencyData.dependenciesDataFor(buildFile, args)
val data = CommandData("getDependencies", Gson().toJson(dd), dd.errorMessage) val result = Gson().toJson(dd)
return result
return Gson().toJson(data)
} catch(ex: Exception) { } catch(ex: Exception) {
return "Error: " + ex.message return "Error: " + ex.message
} finally { } finally {