wired up all the hotlist functionality

This commit is contained in:
2026-01-26 23:13:48 -07:00
parent 58aa01361d
commit 3a9166bcb6
10 changed files with 282 additions and 8 deletions
+19 -1
View File
@@ -122,7 +122,25 @@ func AttachmentSend(ctxt ui.AmContext) (string, any, error) {
return "bytes", data, nil
}
/* HideTopic hides or shows rthe current topic for the current user.
/* AddToHotlist adds the current community and conference to the user's hotlist..
* Parameters:
* ctxt - The AmContext for the request.
* Returns:
* Command string dictating what to be rendered.
* Data as a parameter for the command string.
* Standard Go error status.
*/
func AddToHotlist(ctxt ui.AmContext) (string, any, error) {
comm := ctxt.CurrentCommunity()
conf := ctxt.GetScratch("currentConference").(*database.Conference)
err := database.AmAppendToHotlist(ctxt.Ctx(), ctxt.CurrentUser(), comm.Id, conf.ConfId)
if err != nil {
return ui.ErrorPage(ctxt, err)
}
return "redirect", fmt.Sprintf("/comm/%s/conf/%s", comm.Alias, ctxt.GetScratch("currentAlias")), nil
}
/* HideTopic hides or shows the current topic for the current user.
* Parameters:
* ctxt - The AmContext for the request.
* Returns: