(c *context.APIContext)
| 60 | } |
| 61 | |
| 62 | func GetPublicKey(c *context.APIContext) { |
| 63 | key, err := database.GetPublicKeyByID(c.ParamsInt64(":id")) |
| 64 | if err != nil { |
| 65 | c.NotFoundOrError(err, "get public key by ID") |
| 66 | return |
| 67 | } |
| 68 | |
| 69 | apiLink := composePublicKeysAPILink() |
| 70 | c.JSONSuccess(convert.ToPublicKey(apiLink, key)) |
| 71 | } |
| 72 | |
| 73 | // CreateUserPublicKey creates new public key to given user by ID. |
| 74 | func CreateUserPublicKey(c *context.APIContext, form api.CreateKeyOption, uid int64) { |
nothing calls this directly
no test coverage detected