summaryrefslogtreecommitdiffstats
path: root/models/ssh_key.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-10-04 21:43:04 -0700
committerLauris BH <lauris@nix.lv>2017-10-05 07:43:04 +0300
commitaa962deec037375a7cfae3b96094becdfe48e778 (patch)
treeb4322667ac85dd945c0a6aa65c96ba4fa9b96654 /models/ssh_key.go
parente1266a19c847600aceee6f16875e0384c7c0f736 (diff)
downloadgitea-aa962deec037375a7cfae3b96094becdfe48e778.tar.gz
gitea-aa962deec037375a7cfae3b96094becdfe48e778.zip
Replace deprecated Id method with ID (#2655)
Diffstat (limited to 'models/ssh_key.go')
-rw-r--r--models/ssh_key.go6
1 files changed, 3 insertions, 3 deletions
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)
}