remove specific endpoint from endpoints = superget_endpointsrequest
To remove a specific endpoint from endpoints = super().get_endpoints(request), you can iterate over the endpoints and remove the one you do not want. Here is an example:
endpoints = super().get_endpoints(request)
for endpoint in endpoints:
if endpoint.get("name") == "endpoint_to_remove":
endpoints.remove(endpoint)
In this example, we are checking the name of each endpoint and removing the one with the name "endpoint_to_remove". You can replace "endpoint_to_remove" with the name of the endpoint you want to remove.
原文地址: https://www.cveoy.top/t/topic/buq3 著作权归作者所有。请勿转载和采集!