chore: update seed data

This commit is contained in:
boojack
2022-07-02 15:01:59 +08:00
parent 06fc29aecd
commit 2fe2b82809
3 changed files with 27 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ import (
"encoding/json"
"net/http"
"regexp"
"sort"
"github.com/usememos/memos/api"
@@ -44,6 +45,8 @@ func (s *Server) registerTagRoutes(g *echo.Group) {
tagList = append(tagList, tag)
}
sort.Strings(tagList)
c.Response().Header().Set(echo.HeaderContentType, echo.MIMEApplicationJSONCharsetUTF8)
if err := json.NewEncoder(c.Response().Writer).Encode(composeResponse(tagList)); err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to encode tags response").SetInternal(err)