Skip to content

Commit 4009d7f

Browse files
authored
fix: edited remove organization name (#400)
1 parent 2053947 commit 4009d7f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/actions/organization/delete.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { ActionTransport } = require('@microfleet/core');
2+
const snakeCase = require('lodash/snakeCase');
23
const redisKey = require('../../utils/key');
34
const handlePipeline = require('../../utils/pipelineError');
45
const { checkOrganizationExists, getInternalData } = require('../../utils/organization');
@@ -44,7 +45,7 @@ async function deleteOrganization({ params }) {
4445
});
4546
pipeline.del(organizationMembersListKey);
4647
}
47-
pipeline.hdel(ORGANIZATIONS_NAME_TO_ID, organization[ORGANIZATIONS_NAME_FIELD]);
48+
pipeline.hdel(ORGANIZATIONS_NAME_TO_ID, snakeCase(organization[ORGANIZATIONS_NAME_FIELD]));
4849

4950
return pipeline.exec().then(handlePipeline);
5051
}

0 commit comments

Comments
 (0)