landed AmSearchPosts and the "Find Posts" functionality on the main Find page

This commit is contained in:
2026-01-31 22:32:40 -07:00
parent d621eb07c0
commit 38ed57d207
5 changed files with 272 additions and 16 deletions
+6 -1
View File
@@ -279,7 +279,12 @@ func Find(ctxt ui.AmContext) (string, any, error) {
}
}
case "PST":
// TODO
var postlist []database.PostSearchResult
postlist, total, err = database.AmSearchPosts(ctxt.Ctx(), term, ctxt.CurrentUser(), ofs*listMax, listMax)
if err == nil {
numResults = len(postlist)
ctxt.VarMap().Set("resultList", postlist)
}
}
if err != nil {
ctxt.VarMap().Set("errorMessage", err.Error())