limit the count of tags in transaction template
This commit is contained in:
@@ -140,6 +140,10 @@ func (a *TransactionTemplatesApi) TemplateCreateHandler(c *core.WebContext) (any
|
||||
}
|
||||
}
|
||||
|
||||
if len(templateCreateReq.TagIds) > 10 {
|
||||
return nil, errs.ErrTransactionTemplateHasTooManyTags
|
||||
}
|
||||
|
||||
uid := c.GetCurrentUid()
|
||||
|
||||
maxOrderId, err := a.templates.GetMaxDisplayOrder(c, uid, templateCreateReq.TemplateType)
|
||||
@@ -230,6 +234,10 @@ func (a *TransactionTemplatesApi) TemplateModifyHandler(c *core.WebContext) (any
|
||||
}
|
||||
}
|
||||
|
||||
if len(templateModifyReq.TagIds) > 10 {
|
||||
return nil, errs.ErrTransactionTemplateHasTooManyTags
|
||||
}
|
||||
|
||||
newTemplate := &models.TransactionTemplate{
|
||||
TemplateId: template.TemplateId,
|
||||
Uid: uid,
|
||||
|
||||
Reference in New Issue
Block a user