summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user/key.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/user/key.go')
-rw-r--r--routers/api/v1/user/key.go19
1 files changed, 0 insertions, 19 deletions
diff --git a/routers/api/v1/user/key.go b/routers/api/v1/user/key.go
index 8069660653..fa16df1836 100644
--- a/routers/api/v1/user/key.go
+++ b/routers/api/v1/user/key.go
@@ -39,25 +39,6 @@ func appendPrivateInformation(apiKey *api.PublicKey, key *models.PublicKey, defa
return apiKey, nil
}
-// GetUserByParamsName get user by name
-func GetUserByParamsName(ctx *context.APIContext, name string) *models.User {
- user, err := models.GetUserByName(ctx.Params(name))
- if err != nil {
- if models.IsErrUserNotExist(err) {
- ctx.NotFound()
- } else {
- ctx.Error(http.StatusInternalServerError, "GetUserByName", err)
- }
- return nil
- }
- return user
-}
-
-// GetUserByParams returns user whose name is presented in URL paramenter.
-func GetUserByParams(ctx *context.APIContext) *models.User {
- return GetUserByParamsName(ctx, ":username")
-}
-
func composePublicKeysAPILink() string {
return setting.AppURL + "api/v1/user/keys/"
}