fixed concurrency in users & communities, implemented Communities sidebox

This commit is contained in:
2025-09-24 17:18:52 -06:00
parent 7e11d0273a
commit 3a9ab5c540
5 changed files with 134 additions and 38 deletions
+8 -1
View File
@@ -28,11 +28,11 @@ type AmContext interface {
RC() int
OutputType() string
Render(string) error
Scratchpad() map[string]any
SubRender(string) ([]byte, error)
Session() *sessions.Session
SetOutputType(string)
SetRC(int)
GetScratch(string) any
SetScratch(string, any)
URLPath() string
VarMap() jet.VarMap
@@ -117,6 +117,13 @@ func (c *amContext) SetRC(rc int) {
c.httprc = rc
}
func (c *amContext) GetScratch(name string) any {
if c.scratchpad == nil {
return nil
}
return c.scratchpad[name]
}
func (c *amContext) SetScratch(name string, val any) {
if c.scratchpad == nil {
c.scratchpad = make(map[string]any)