mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
enhance: validate settings value before save
This commit is contained in:
parent
d70e37c857
commit
d67b8428e4
8 changed files with 83 additions and 26 deletions
|
@ -1,10 +1,10 @@
|
|||
package settings
|
||||
|
||||
type OpenAI struct {
|
||||
BaseUrl string `json:"base_url"`
|
||||
Token string `json:"token"`
|
||||
Proxy string `json:"proxy"`
|
||||
Model string `json:"model"`
|
||||
BaseUrl string `json:"base_url" binding:"omitempty,url"`
|
||||
Token string `json:"token" binding:"omitempty,alphanumdash"`
|
||||
Proxy string `json:"proxy" binding:"omitempty,url"`
|
||||
Model string `json:"model" binding:"omitempty,alphanumdash"`
|
||||
}
|
||||
|
||||
var OpenAISettings = OpenAI{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue