mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update list users
This commit is contained in:
@ -39,7 +39,7 @@ func NewFrontendService(profile *profile.Profile, store *store.Store) *FrontendS
|
||||
}
|
||||
|
||||
func (s *FrontendService) Serve(e *echo.Echo) {
|
||||
// Use echo static middleware to serve the built dist folder
|
||||
// Use echo static middleware to serve the built dist folder.
|
||||
// refer: https://github.com/labstack/echo/blob/master/middleware/static.go
|
||||
e.Use(middleware.StaticWithConfig(middleware.StaticConfig{
|
||||
Skipper: defaultAPIRequestSkipper,
|
||||
@ -80,6 +80,10 @@ func (s *FrontendService) registerRoutes(e *echo.Echo) {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, "Instance URL system setting is not set")
|
||||
}
|
||||
instanceURL := instanceURLSetting.Value
|
||||
if instanceURL == "" {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, "Instance URL system setting is not set")
|
||||
}
|
||||
|
||||
robotsTxt := fmt.Sprintf(`User-agent: *
|
||||
Allow: /
|
||||
Host: %s
|
||||
@ -98,8 +102,11 @@ Sitemap: %s/sitemap.xml`, instanceURL, instanceURL)
|
||||
if instanceURLSetting == nil {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, "Instance URL system setting is not set")
|
||||
}
|
||||
|
||||
instanceURL := instanceURLSetting.Value
|
||||
if instanceURL == "" {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, "Instance URL system setting is not set")
|
||||
}
|
||||
|
||||
urlsets := []string{}
|
||||
// Append memo list.
|
||||
memoList, err := s.Store.ListMemos(ctx, &store.FindMemo{
|
||||
|
Reference in New Issue
Block a user