diff options
Diffstat (limited to 'actions.go')
-rw-r--r-- | actions.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 { |