limit maximum count of tags in a transaction
This commit is contained in:
@@ -646,6 +646,10 @@ func (a *TransactionsApi) TransactionCreateHandler(c *core.WebContext) (any, *er
|
||||
return nil, errs.ErrTransactionTagIdInvalid
|
||||
}
|
||||
|
||||
if len(tagIds) > 10 {
|
||||
return nil, errs.ErrTransactionTagTooMuch
|
||||
}
|
||||
|
||||
pictureIds, err := utils.StringArrayToInt64Array(transactionCreateReq.PictureIds)
|
||||
|
||||
if err != nil {
|
||||
@@ -772,6 +776,10 @@ func (a *TransactionsApi) TransactionModifyHandler(c *core.WebContext) (any, *er
|
||||
return nil, errs.ErrTransactionTagIdInvalid
|
||||
}
|
||||
|
||||
if len(tagIds) > 10 {
|
||||
return nil, errs.ErrTransactionTagTooMuch
|
||||
}
|
||||
|
||||
pictureIds, err := utils.StringArrayToInt64Array(transactionModifyReq.PictureIds)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user