[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,
|
||||
"mode": mode,
|
||||
"apiPrefix": "__yao",
|
||||
"token": "localStorage",
|
||||
"token": Setting.Token,
|
||||
"optional": Setting.Optional,
|
||||
"login": xgenLogin,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ func TestProcessXgen(t *testing.T) {
|
|||
assert.Equal(t, os.Getenv("YAO_ENV"), xgen.Get("mode"))
|
||||
assert.Equal(t, "Demo Application", xgen.Get("name"))
|
||||
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) != "")
|
||||
|
||||
// Set
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ type DSL struct {
|
|||
Menu MenuDSL `json:"menu,omitempty"`
|
||||
AdminRoot string `json:"adminRoot,omitempty"`
|
||||
Optional OptionalDSL `json:"optional,omitempty"`
|
||||
Token OptionalDSL `json:"token,omitempty"`
|
||||
Setting string `json:"setting,omitempty"` // custom setting process
|
||||
Setup string `json:"setup,omitempty"` // setup process
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue