fixed concurrency in users & communities, implemented Communities sidebox
This commit is contained in:
+8
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user