mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-11 08:55:22 +02:00
feat: enhance security handling by adding refetch capability and improving error messages in security service
This commit is contained in:
@@ -46,7 +46,7 @@ export const HandleSecurity = ({
|
||||
}: Props) => {
|
||||
const utils = api.useUtils();
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const { data } = api.security.one.useQuery(
|
||||
const { data, refetch } = api.security.one.useQuery(
|
||||
{
|
||||
securityId: securityId ?? "",
|
||||
},
|
||||
@@ -88,6 +88,7 @@ export const HandleSecurity = ({
|
||||
await utils.application.readTraefikConfig.invalidate({
|
||||
applicationId,
|
||||
});
|
||||
await refetch();
|
||||
setIsOpen(false);
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -43,7 +43,7 @@ export const securityRouter = createTRPCRouter({
|
||||
message: "You are not authorized to access this application",
|
||||
});
|
||||
}
|
||||
return await findSecurityById(input.securityId);
|
||||
return security;
|
||||
}),
|
||||
delete: protectedProcedure
|
||||
.input(apiFindOneSecurity)
|
||||
|
||||
Reference in New Issue
Block a user