Remove schema ignore tag for captcha from School struct
This commit is contained in:
parent
41b974b516
commit
d167c84605
1 changed files with 4 additions and 2 deletions
|
@ -2,6 +2,7 @@ package orm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -69,8 +70,8 @@ type School struct {
|
||||||
SelectedRegion map[uint]string `gorm:"-"`
|
SelectedRegion map[uint]string `gorm:"-"`
|
||||||
AllRegions []*Region `gorm:"-"`
|
AllRegions []*Region `gorm:"-"`
|
||||||
|
|
||||||
CaptchaID string `gorm:"-" schema:"-"`
|
CaptchaID string `gorm:"-"`
|
||||||
CaptchaSolution string `gorm:"-" schema:"-"`
|
CaptchaSolution string `gorm:"-"`
|
||||||
|
|
||||||
mailSender *mail.MailSender
|
mailSender *mail.MailSender
|
||||||
}
|
}
|
||||||
|
@ -196,6 +197,7 @@ func (model *School) Create(db *Database, args map[string]string, w http.Respons
|
||||||
school := new(School)
|
school := new(School)
|
||||||
err := renderer.Decode(school, r)
|
err := renderer.Decode(school, r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Println("Captcha", r.FormValue("CaptchaID"), r.FormValue("CaptchaSolution"))
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue