Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
proxy-manager-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aolda
proxy-manager-frontend
Commits
73f4b9af
Commit
73f4b9af
authored
1 month ago
by
한동현
Browse files
Options
Downloads
Patches
Plain Diff
feat: 인증서 삭제 실패 권한 오류 메시지 추가
parent
d089e9e0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pages/certificate/List.tsx
+13
-9
13 additions, 9 deletions
src/pages/certificate/List.tsx
with
13 additions
and
9 deletions
src/pages/certificate/List.tsx
+
13
−
9
View file @
73f4b9af
...
@@ -49,20 +49,24 @@ export default function CertificateList() {
...
@@ -49,20 +49,24 @@ export default function CertificateList() {
});
});
},
[
authFetch
,
selectedProject
,
searchParams
]);
},
[
authFetch
,
selectedProject
,
searchParams
]);
const
handleDelete
=
()
=>
{
const
handleDelete
=
async
()
=>
{
if
(
selectedCertificate
===
null
)
throw
Error
(
'
selectedCertificate is null
'
);
if
(
selectedCertificate
===
null
)
throw
Error
(
'
selectedCertificate is null
'
);
authFetch
(
`/api/certificate?certificateId=
${
selectedCertificate
.
id
}
`
,
{
const
response
=
await
authFetch
(
`/api/certificate?certificateId=
${
selectedCertificate
.
id
}
`
,
{
method
:
'
DELETE
'
,
method
:
'
DELETE
'
,
}).
then
((
response
)
=>
{
});
if
(
!
response
.
ok
)
{
if
(
!
response
.
ok
)
{
console
.
error
(
response
);
const
{
code
}
=
await
response
.
json
();
if
(
code
==
'
UNAUTHORIZED_USER
'
)
{
toast
.
error
(
'
SSL 인증서를 삭제할 권한이 없습니다
'
);
}
else
{
toast
.
error
(
'
SSL 인증서 삭제에 실패했습니다
'
);
toast
.
error
(
'
SSL 인증서 삭제에 실패했습니다
'
);
}
}
else
{
}
else
{
toast
.
warning
(
'
SSL 인증서가 삭제되었습니다
'
);
toast
.
warning
(
'
SSL 인증서가 삭제되었습니다
'
);
setCertificates
((
prev
)
=>
prev
!
.
filter
((
certificate
)
=>
certificate
.
id
!==
selectedCertificate
.
id
));
setCertificates
((
prev
)
=>
prev
!
.
filter
((
certificate
)
=>
certificate
.
id
!==
selectedCertificate
.
id
));
}
}
});
};
};
return
(
return
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment