mirror of
https://github.com/axllent/mailpit.git
synced 2026-06-28 06:56:06 +00:00
API: Sort tags before saving
Tags should be alphabetically sorted before saving. Whilst this was the behavior with automated tagging, it did not apply to manually set tags via the API.
This commit is contained in:
@@ -22,6 +22,8 @@ func SetTags(id string, tags []string) error {
|
||||
}
|
||||
}
|
||||
|
||||
sort.Strings(applyTags)
|
||||
|
||||
tagJSON, err := json.Marshal(applyTags)
|
||||
if err != nil {
|
||||
logger.Log().Errorf("[db] setting tags for message %s", id)
|
||||
|
||||
Reference in New Issue
Block a user