local template = require "resty.template" 
local handle = require('framework.handle')
local tanks = require('database.tanks')
local sensors = require('database.sensors')

local function resp(start,ends)
	local view = template.new("archive.html", "layout.html")
	view.title = "Мои архивные чаны"
	view.cellar = sensors.cellar.now()
	view.room = sensors.room.now()
	view.weather = sensors.weather.now()
	view.tanks = tanks.archive()
	view:render()
end

local request = { 
    GET = function()
		resp()
	end
}

ngx.say(handle(request))

