From 0dc6e92cd018aa0ecea5349a14599279e1a2a574 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Mon, 6 Feb 2017 09:06:37 -0500 Subject: Simplified the Archive library. Added a way to pull the config from the web application --- web.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'web.go') diff --git a/web.go b/web.go index 444c2ce..498df4e 100644 --- a/web.go +++ b/web.go @@ -20,6 +20,8 @@ func main() { api.Get("/api/libraries/", listLibraries(config)) api.Get("/api/libraries/:id", listLibrary(config)) + api.Get("/api/Config", getConfig(config)) + api.Get("/data/:value/:and/:some/:giggles", dataTest()) api.Get("/data/:value/:and", dataTest()) api.Get("/data/:value", dataTest()) @@ -33,6 +35,12 @@ func dataTest() iris.HandlerFunc { } } +func getConfig(c *config.Config) iris.HandlerFunc { + return func(ctx *iris.Context) { + ctx.JSON(200, c) + } +} + func listLibraries(c *config.Config) iris.HandlerFunc { return func(ctx *iris.Context) { libs, err := steam.ProcessMultipleLibraries(c.SteamRepositories) -- cgit v1.2.3