summaryrefslogtreecommitdiffstats
path: root/acfupdate-controller.lua
blob: df8fdf5f1f61bec8bfc50cfe688b81e3d7e08b1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
module (..., package.seeall)

-- ################################################################################
-- PUBLIC FUNCTIONS

default_action = "read"

function read (self )
	return ({projects = self.model:get(), 
		url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} )
end

function update (self )
	return ({projects = self.model:get(),
		updates = self.model:update(), 
		url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} )
end

function diff (self )
	return ({projects = self.model:get(),
		updates = self.model:diffs(), 
		url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} )
end

function status (self )
	return ({projects = self.model:get(),
		updates = self.model:status(), 
		url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} )
end

function log (self )
	return ({projects = self.model:get(),
		updates = self.model:log(), 
		url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} )
end