mirror of
				https://gitea.com/gitea/tea.git
				synced 2025-10-31 01:05:26 +01:00 
			
		
		
		
	[Refactor] unexport config.Config var & move login tasks to task module (#288)
Unexport generateToken() move CreateLogin into task Create func config.SetDefaultLogin() Unexport loadConfig() & saveConfig unexport config var make SetDefaultLogin() case insensitive update func descriptions move FindSSHKey to task module Reviewed-on: https://gitea.com/gitea/tea/pulls/288 Reviewed-by: Norwin <noerw@noreply.gitea.io> Reviewed-by: Andrew Thornton <art27@cantab.net> Co-Authored-By: 6543 <6543@obermui.de> Co-Committed-By: 6543 <6543@obermui.de>
This commit is contained in:
		| @@ -8,7 +8,7 @@ import ( | ||||
| 	"fmt" | ||||
| 	"strings" | ||||
|  | ||||
| 	"code.gitea.io/tea/modules/config" | ||||
| 	"code.gitea.io/tea/modules/task" | ||||
|  | ||||
| 	"github.com/AlecAivazis/survey/v2" | ||||
| ) | ||||
| @@ -28,7 +28,7 @@ func CreateLogin() error { | ||||
| 		return nil | ||||
| 	} | ||||
|  | ||||
| 	name, err := config.GenerateLoginName(giteaURL, "") | ||||
| 	name, err := task.GenerateLoginName(giteaURL, "") | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| @@ -87,5 +87,5 @@ func CreateLogin() error { | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	return config.AddLogin(name, token, user, passwd, sshKey, giteaURL, insecure) | ||||
| 	return task.CreateLogin(name, token, user, passwd, sshKey, giteaURL, insecure) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 6543
					6543