mirror of
https://gitea.com/gitea/tea.git
synced 2026-06-05 18:58:43 +02:00
Move sdk from code.gitea.io/sdk/gitea to gitea.dev/sdk (#1006)
Reviewed-on: https://gitea.com/gitea/tea/pulls/1006 Reviewed-by: Zettat123 <39446+zettat123@noreply.gitea.com>
This commit is contained in:
+4
-3
@@ -110,10 +110,10 @@ var CmdLoginAdd = cli.Command{
|
||||
Action: runLoginAdd,
|
||||
}
|
||||
|
||||
func runLoginAdd(_ context.Context, cmd *cli.Command) error {
|
||||
func runLoginAdd(requestCtx context.Context, cmd *cli.Command) error {
|
||||
// if no args create login interactive
|
||||
if cmd.NumFlags() == 0 {
|
||||
if err := interact.CreateLogin(); err != nil && !interact.IsQuitting(err) {
|
||||
if err := interact.CreateLogin(requestCtx); err != nil && !interact.IsQuitting(err) {
|
||||
return fmt.Errorf("error adding login: %w", err)
|
||||
}
|
||||
return nil
|
||||
@@ -137,7 +137,7 @@ func runLoginAdd(_ context.Context, cmd *cli.Command) error {
|
||||
opts.RedirectURL = cmd.String("redirect-url")
|
||||
}
|
||||
|
||||
return auth.OAuthLoginWithFullOptions(opts)
|
||||
return auth.OAuthLoginWithFullOptions(requestCtx, opts)
|
||||
}
|
||||
|
||||
sshAgent := false
|
||||
@@ -147,6 +147,7 @@ func runLoginAdd(_ context.Context, cmd *cli.Command) error {
|
||||
|
||||
// else use args to add login
|
||||
return task.CreateLogin(
|
||||
requestCtx,
|
||||
cmd.String("name"),
|
||||
cmd.String("token"),
|
||||
cmd.String("user"),
|
||||
|
||||
Reference in New Issue
Block a user