diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2017-02-06 09:06:37 -0500 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2017-02-06 09:06:37 -0500 |
| commit | 0dc6e92cd018aa0ecea5349a14599279e1a2a574 (patch) | |
| tree | 81e071239c7a0c5bd9e7d1edbcf25bd9913f656e /web.go | |
| parent | c7ab6d7782486fda6d6327ba8306e474daef677a (diff) | |
| download | steam-export-old_dev.tar.gz steam-export-old_dev.tar.xz | |
Simplified the Archive library. Added a way to pull the config from the web applicationold_dev
Diffstat (limited to 'web.go')
| -rw-r--r-- | web.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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) |
