summaryrefslogtreecommitdiff
path: root/actions.go
diff options
context:
space:
mode:
Diffstat (limited to 'actions.go')
-rw-r--r--actions.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/actions.go b/actions.go
index f41e1ff..190314c 100644
--- a/actions.go
+++ b/actions.go
@@ -6,6 +6,18 @@ import (
"text/template"
)
+func CreateMotion(decision *Decision, voter *Voter) (err error) {
+ decision.ProponentId = voter.Id
+ err = decision.Save()
+ if err != nil {
+ logger.Println("Error saving motion:", err)
+ return
+ }
+
+ // TODO: implement fetching new decision, implement mail
+ return
+}
+
func WithdrawMotion(decision *Decision, voter *Voter) (err error) {
// load template, fill name, tag, title, content
type mailContext struct {