Enhance configuration and logging for user management commands
- Updated `.env.example` to include new settings for trusted proxies and networks for better security with X-Forwarded headers. - Modified `BlockUserCommandHandler` and `UnblockUserCommandHandler` to include logging for gateway update failures, ensuring better traceability of issues during user blocking/unblocking. - Adjusted tests for command handlers to incorporate logging functionality, improving test coverage and reliability. - Updated frontend configuration to dynamically set the server port based on environment variables.
This commit is contained in:
@@ -16,13 +16,13 @@ function AdminRolesPage() {
|
||||
const queryClient = useQueryClient()
|
||||
const [editing, setEditing] = useState<RoleDto | null>(null)
|
||||
|
||||
const { data, isLoading, isError, refetch } = useQuery({ queryKey: ['admin-roles-page'], queryFn: listRoles })
|
||||
const { data, isLoading, isError, refetch } = useQuery({ queryKey: ['admin-roles'], queryFn: listRoles })
|
||||
|
||||
const deleteMutation = useMutation({
|
||||
mutationFn: deleteRole,
|
||||
onSuccess: async () => {
|
||||
toast.success(t('admin.roles.deleted'))
|
||||
await queryClient.invalidateQueries({ queryKey: ['admin-roles-page'] })
|
||||
await queryClient.invalidateQueries({ queryKey: ['admin-roles'] })
|
||||
},
|
||||
onError: () => toast.error(t('auth.genericError')),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user