Skip to content

Commit 01a4e13

Browse files
handle delete directly with config handler
1 parent 106c115 commit 01a4e13

File tree

1 file changed

+1
-4
lines changed
  • packages/contentstack-config/src/commands/config/remove

1 file changed

+1
-4
lines changed

packages/contentstack-config/src/commands/config/remove/rate-limit.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ export default class RateLimitRemoveCommand extends Command {
2424
cliux.print(`No rate limit found for the organization UID: ${org}`, { color: 'red' });
2525
return;
2626
}
27-
28-
delete rateLimit[org];
29-
30-
configHandler.set('rateLimit', rateLimit);
27+
configHandler.delete(`rateLimit.${org}`);
3128
cliux.print(`Rate limit entry for organization UID ${org} has been removed.`, { color: 'green' });
3229
} catch (error) {
3330
this.log('Unable to remove the rate limit entry', error instanceof Error ? error.message : error);

0 commit comments

Comments
 (0)