This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
Gitlink
/
forgeplus
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
16
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
add: remove public key from api
tags/v3.1.5
yystopf
4 years ago
parent
fcc7736c34
commit
f5e07ab3ec
2 changed files
with
4 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-1
app/controllers/public_keys_controller.rb
+2
-1
app/services/gitea/user/keys/delete_service.rb
+ 2
- 1
app/controllers/public_keys_controller.rb
View File
@@ -32,7 +32,8 @@ class PublicKeysController < ApplicationController
def destroy
return render_not_found unless @public_key.present?
if @public_key.destroy
result = Gitea::User::Keys::DeleteService.call(current_user.gitea_token, @public_key.id)
if result[0] == 204
render_ok
else
render_error
+ 2
- 1
app/services/gitea/user/keys/delete_service.rb
View File
@@ -7,7 +7,8 @@ class Gitea::User::Keys::DeleteService < Gitea::ClientService
end
def call
delete(url, params)
response = delete(url, params)
render_response(response)
end
private
Write
Preview
Loading…
Cancel
Save