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

local function resp(start,ends)
	local view = template.new("archive.html", "layout.html")
	view.title = "Мои архивные чаны"
	view.cellar = {temp=12, warm=45, warm_status='is-danger',temp_status='is-warning'}
	view.room = {temp=18, warm=45,warm_status='is-success',temp_status='is-warning'}
	view.tanks = tanks.archive()
	view:render()
end

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

ngx.say(handle(request))

