add gauge API

This commit is contained in:
Pierre de Lacroix 2026-01-22 19:26:40 +01:00
parent 617c2ab725
commit d2ec7b12a9
Signed by: lateralus23
GPG key ID: 53E0CEC29C24EF39
8 changed files with 67 additions and 1 deletions

View file

@ -0,0 +1,14 @@
defmodule CampApiWeb.GristController do
use CampApiWeb, :controller
alias CampApi.Grist
alias CampApi.Grist.Gauge
action_fallback CampApiWeb.FallbackController
def gauge(conn, _params) do
gauge = Gauge.get()
render(conn, :gauge, gauge: gauge)
end
end

View file

@ -0,0 +1,7 @@
defmodule CampApiWeb.GristJSON do
alias CampApi.Grist.Gauge
def gauge(%{gauge: gauge}) do
%{gauge: gauge}
end
end