From aa962deec037375a7cfae3b96094becdfe48e778 Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Wed, 4 Oct 2017 21:43:04 -0700 Subject: Replace deprecated Id method with ID (#2655) --- models/ssh_key.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'models/ssh_key.go') diff --git a/models/ssh_key.go b/models/ssh_key.go index a83d8fb60f..1cca47f565 100644 --- a/models/ssh_key.go +++ b/models/ssh_key.go @@ -722,7 +722,7 @@ func AddDeployKey(repoID int64, name, content string) (*DeployKey, error) { // GetDeployKeyByID returns deploy key by given ID. func GetDeployKeyByID(id int64) (*DeployKey, error) { key := new(DeployKey) - has, err := x.Id(id).Get(key) + has, err := x.ID(id).Get(key) if err != nil { return nil, err } else if !has { @@ -748,7 +748,7 @@ func GetDeployKeyByRepo(keyID, repoID int64) (*DeployKey, error) { // UpdateDeployKey updates deploy key information. func UpdateDeployKey(key *DeployKey) error { - _, err := x.Id(key.ID).AllCols().Update(key) + _, err := x.ID(key.ID).AllCols().Update(key) return err } @@ -782,7 +782,7 @@ func DeleteDeployKey(doer *User, id int64) error { return err } - if _, err = sess.Id(key.ID).Delete(new(DeployKey)); err != nil { + if _, err = sess.ID(key.ID).Delete(new(DeployKey)); err != nil { return fmt.Errorf("delete deploy key [%d]: %v", key.ID, err) } -- cgit v1.2.3