console: fix removing of restified endpoint on deleting operation from allowlist

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10917
GitOrigin-RevId: 712fe9a322fa8279a163de740a24ee1948da20c7
This commit is contained in:
Varun Choudhary 2024-07-04 21:23:43 +05:30 committed by hasura-bot
parent 7a2fc4e7ee
commit 2723b5d6da

View File

@ -36,9 +36,16 @@ export const useRemoveOperationsFromQueryCollection = () => {
const restEndpoints = metadata?.metadata?.rest_endpoints || [];
const args = [];
console.log('>>>>', queryCollection, queries, options);
queries.forEach(endpoint => {
if (restEndpoints.some(e => e.name === endpoint.name)) {
if (
restEndpoints.some(
e =>
e.name === endpoint.name &&
e.definition.query.collection_name === queryCollection
)
) {
args.push({
type: 'drop_rest_endpoint',
args: {