Trim payee name when too long
This commit is contained in:
parent
2559d2dbdb
commit
4d04529ae2
@ -24,6 +24,9 @@ type CreatePayeeParams struct {
|
||||
}
|
||||
|
||||
func (q *Queries) CreatePayee(ctx context.Context, arg CreatePayeeParams) (Payee, error) {
|
||||
if len(arg.Name) > 50 {
|
||||
arg.Name = arg.Name[:50]
|
||||
}
|
||||
row := q.db.QueryRowContext(ctx, createPayee, arg.Name, arg.BudgetID)
|
||||
var i Payee
|
||||
err := row.Scan(&i.ID, &i.BudgetID, &i.Name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user