admin: Insert $team assignee in db automatically
This commit is contained in:
parent
f5941dcece
commit
abf0715dbf
4 changed files with 37 additions and 32 deletions
|
@ -283,9 +283,9 @@ func eventHandler(f func(fic.Event, []byte) (interface{}, error)) func(httproute
|
|||
func claimHandler(f func(fic.Claim, []byte) (interface{}, error)) func(httprouter.Params, []byte) (interface{}, error) {
|
||||
return func(ps httprouter.Params, body []byte) (interface{}, error) {
|
||||
if cid, err := strconv.ParseInt(string(ps.ByName("cid")), 10, 64); err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("Invalid claim id: %w", err)
|
||||
} else if claim, err := fic.GetClaim(cid); err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("Unable to find requested claim (id=%d): %w", cid, err)
|
||||
} else {
|
||||
return f(claim, body)
|
||||
}
|
||||
|
|
Reference in a new issue