[add] app setting token option
This commit is contained in:
parent
b93ea2e9af
commit
dd05336443
3 changed files with 3 additions and 2 deletions
|
|
@ -570,7 +570,7 @@ func processXgen(process *process.Process) interface{} {
|
||||||
"lang": Setting.Lang,
|
"lang": Setting.Lang,
|
||||||
"mode": mode,
|
"mode": mode,
|
||||||
"apiPrefix": "__yao",
|
"apiPrefix": "__yao",
|
||||||
"token": "localStorage",
|
"token": Setting.Token,
|
||||||
"optional": Setting.Optional,
|
"optional": Setting.Optional,
|
||||||
"login": xgenLogin,
|
"login": xgenLogin,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,7 @@ func TestProcessXgen(t *testing.T) {
|
||||||
assert.Equal(t, os.Getenv("YAO_ENV"), xgen.Get("mode"))
|
assert.Equal(t, os.Getenv("YAO_ENV"), xgen.Get("mode"))
|
||||||
assert.Equal(t, "Demo Application", xgen.Get("name"))
|
assert.Equal(t, "Demo Application", xgen.Get("name"))
|
||||||
assert.Equal(t, true, xgen.Get("optional.hideNotification"))
|
assert.Equal(t, true, xgen.Get("optional.hideNotification"))
|
||||||
assert.Equal(t, "localStorage", xgen.Get("token"))
|
// assert.Equal(t, "localStorage", xgen.Get("token"))
|
||||||
assert.Equal(t, true, xgen.Get("sid").(string) != "")
|
assert.Equal(t, true, xgen.Get("sid").(string) != "")
|
||||||
|
|
||||||
// Set
|
// Set
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ type DSL struct {
|
||||||
Menu MenuDSL `json:"menu,omitempty"`
|
Menu MenuDSL `json:"menu,omitempty"`
|
||||||
AdminRoot string `json:"adminRoot,omitempty"`
|
AdminRoot string `json:"adminRoot,omitempty"`
|
||||||
Optional OptionalDSL `json:"optional,omitempty"`
|
Optional OptionalDSL `json:"optional,omitempty"`
|
||||||
|
Token OptionalDSL `json:"token,omitempty"`
|
||||||
Setting string `json:"setting,omitempty"` // custom setting process
|
Setting string `json:"setting,omitempty"` // custom setting process
|
||||||
Setup string `json:"setup,omitempty"` // setup process
|
Setup string `json:"setup,omitempty"` // setup process
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue