mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-20 05:10:52 +08:00
Update internal/tui/auth_tab.go
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -115,7 +115,12 @@ func (m authTabModel) Update(msg tea.Msg) (authTabModel, tea.Cmd) {
|
|||||||
m.editInput.Blur()
|
m.editInput.Blur()
|
||||||
fields := map[string]any{}
|
fields := map[string]any{}
|
||||||
if fieldKey == "priority" {
|
if fieldKey == "priority" {
|
||||||
p, _ := strconv.Atoi(value)
|
p, err := strconv.Atoi(value)
|
||||||
|
if err != nil {
|
||||||
|
return m, func() tea.Msg {
|
||||||
|
return authActionMsg{err: fmt.Errorf("invalid priority: must be a number")}
|
||||||
|
}
|
||||||
|
}
|
||||||
fields[fieldKey] = p
|
fields[fieldKey] = p
|
||||||
} else {
|
} else {
|
||||||
fields[fieldKey] = value
|
fields[fieldKey] = value
|
||||||
|
|||||||
Reference in New Issue
Block a user