mirror of
https://github.com/usememos/memos.git
synced 2024-12-24 03:33:52 +03:00
parent
fe05e6a464
commit
bf07ab9e2f
@ -47,9 +47,15 @@ func (s *Server) registerTagRoutes(g *echo.Group) {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find memo list").SetInternal(err)
|
||||
}
|
||||
|
||||
tagList := []string{}
|
||||
tagMapSet := make(map[string]bool)
|
||||
for _, memo := range memoList {
|
||||
tagList = append(tagList, findTagListFromMemoContent(memo.Content)...)
|
||||
for _, tag := range findTagListFromMemoContent(memo.Content) {
|
||||
tagMapSet[tag] = true
|
||||
}
|
||||
}
|
||||
tagList := []string{}
|
||||
for tag := range tagMapSet {
|
||||
tagList = append(tagList, tag)
|
||||
}
|
||||
sort.Strings(tagList)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user