mirror of
https://github.com/yhl452493373/frps-panel.git
synced 2026-04-04 06:16:59 +08:00
success write tokens to config with toml (not finish)
This commit is contained in:
@@ -39,7 +39,7 @@ type HTTPError struct {
|
||||
|
||||
type Config struct {
|
||||
Common CommonInfo
|
||||
Tokens []TokenInfo
|
||||
Tokens
|
||||
}
|
||||
|
||||
type CommonInfo struct {
|
||||
@@ -58,6 +58,10 @@ type CommonInfo struct {
|
||||
DashboardTls bool
|
||||
}
|
||||
|
||||
type Tokens struct {
|
||||
Tokens map[string]TokenInfo `toml:"tokens"`
|
||||
}
|
||||
|
||||
type TokenInfo struct {
|
||||
User string `toml:"user" json:"user" form:"user"`
|
||||
Token string `toml:"token" json:"token" form:"token"`
|
||||
@@ -112,3 +116,9 @@ type TokenEnable struct {
|
||||
func (e *HTTPError) Error() string {
|
||||
return e.Err.Error()
|
||||
}
|
||||
|
||||
func (c *HandleController) TokensList() Tokens {
|
||||
return Tokens{
|
||||
c.Tokens,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user