wip1
This commit is contained in:
parent
977a75819d
commit
f25068075c
7 changed files with 113 additions and 22 deletions
|
|
@ -65,7 +65,7 @@ func (i Item) GetCheck(id int64) (c Check, err error) {
|
|||
}
|
||||
|
||||
func (i Item) NewCheck(user User, state string, comment string) (Check, error) {
|
||||
if res, err := DBExec("INSERT INTO checks (id_item, id_user, passed, comment) VALUES (?, ?, ?)", i.Id, user.Id, state, comment); err != nil {
|
||||
if res, err := DBExec("INSERT INTO checks (id_item, id_user, passed, comment) VALUES (?, ?, ?, ?)", i.Id, user.Id, state, comment); err != nil {
|
||||
return Check{}, err
|
||||
} else if cid, err := res.LastInsertId(); err != nil {
|
||||
return Check{}, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue