From ead5cfdcc642bb60ab1b00fb22e536f13ed62311 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Thu, 4 Jul 2024 17:02:34 -0300 Subject: [PATCH] Cleanup --- src/daemon/funko.cr | 3 ++- src/daemon/main.cr | 2 +- src/daemon/{proxyconf.cr => proxy.cr} | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) rename src/daemon/{proxyconf.cr => proxy.cr} (98%) diff --git a/src/daemon/funko.cr b/src/daemon/funko.cr index 3ba07ec..99f92a0 100644 --- a/src/daemon/funko.cr +++ b/src/daemon/funko.cr @@ -91,7 +91,8 @@ module Funko end if env.params.query.fetch("format", "json") == "html" - render "src/views/funkos.ecr" else + render "src/views/funkos.ecr" + else result.to_json end end diff --git a/src/daemon/main.cr b/src/daemon/main.cr index 56c9e7a..bfc2948 100644 --- a/src/daemon/main.cr +++ b/src/daemon/main.cr @@ -1,5 +1,5 @@ require "./funko.cr" -require "./proxyconf.cr" +require "./proxy.cr" require "./secrets.cr" require "./terminal.cr" require "compress/gzip" diff --git a/src/daemon/proxyconf.cr b/src/daemon/proxy.cr similarity index 98% rename from src/daemon/proxyconf.cr rename to src/daemon/proxy.cr index 6ccc5fd..2916042 100644 --- a/src/daemon/proxyconf.cr +++ b/src/daemon/proxy.cr @@ -1,5 +1,5 @@ require "docr" -require "funko" +require "./funko.cr" require "kemal" module Proxy