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:
Lunny Xiao
2026-05-26 04:51:09 +00:00
parent 579099f9d9
commit 28ba9b915b
179 changed files with 617 additions and 599 deletions
+3 -3
View File
@@ -32,7 +32,7 @@ var CmdSSHKeyDelete = cli.Command{
}
// RunSSHKeyDelete removes an SSH key by its numeric ID
func RunSSHKeyDelete(_ stdctx.Context, cmd *cli.Command) error {
func RunSSHKeyDelete(requestCtx stdctx.Context, cmd *cli.Command) error {
ctx, err := context.InitCommand(cmd)
if err != nil {
return err
@@ -49,7 +49,7 @@ func RunSSHKeyDelete(_ stdctx.Context, cmd *cli.Command) error {
client := ctx.Login.Client()
key, resp, err := client.GetPublicKey(keyID)
key, resp, err := client.Users.GetPublicKey(requestCtx, keyID)
if err != nil {
if resp != nil && resp.StatusCode == 404 {
return fmt.Errorf("SSH key with ID %d not found", keyID)
@@ -67,7 +67,7 @@ func RunSSHKeyDelete(_ stdctx.Context, cmd *cli.Command) error {
}
}
if _, err = client.DeletePublicKey(keyID); err != nil {
if _, err = client.Users.DeletePublicKey(requestCtx, keyID); err != nil {
return err
}