Skip to content

Commit

Permalink
Remove legacy code #2
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsunkel committed Jan 17, 2025
1 parent 6ace295 commit aa4575d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 94 deletions.

This file was deleted.

27 changes: 1 addition & 26 deletions src/apps/companies/apps/match-company/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ const { get, isEmpty, pick } = require('lodash')
const url = require('url')

const { searchDnbCompanies } = require('../../../../modules/search/services')
const {
linkDataHubCompanyToDnBCompany,
createDnbCompanyInvestigation,
} = require('../../repos')
const { transformToDnbInvestigation } = require('./transformers')
const { linkDataHubCompanyToDnBCompany } = require('../../repos')
const { getOptions } = require('../../../../lib/options')
const { postToZenDesk } = require('../../../support/services')
const urls = require('../../../../lib/urls')
Expand Down Expand Up @@ -187,26 +183,6 @@ async function findDnbCompany(req, res, next) {
}
}

async function submitNewDnbRecordRequest(req, res, next) {
try {
const { company } = res.locals
const { website, telephone_number } = req.body

const transformed = transformToDnbInvestigation(
company,
website,
telephone_number
)

const dnbResponse = await createDnbCompanyInvestigation(req, transformed)

req.flash('success', 'Verification request sent for third party review')
res.json(dnbResponse)
} catch (error) {
next(error)
}
}

async function submitMergeRequest(req, res, next) {
try {
const ticket = createMergeRequestMessage(req, res)
Expand Down Expand Up @@ -254,7 +230,6 @@ module.exports = {
renderMatchConfirmation,
renderFindCompanyForm,
findDnbCompany,
submitNewDnbRecordRequest,
submitMergeRequest,
linkCompanies,
}
2 changes: 0 additions & 2 deletions src/apps/companies/apps/match-company/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ const {
findDnbCompany,
renderMatchConfirmation,
linkCompanies,
submitNewDnbRecordRequest,
submitMergeRequest,
} = require('./controllers')

router.get(urls.companies.match.index.route, renderFindCompanyForm)
router.post(urls.companies.match.index.route, findDnbCompany)
router.post(urls.companies.match.cannotFind.route, submitNewDnbRecordRequest)
router.get(urls.companies.match.confirmation.route, renderMatchConfirmation)
router.post(urls.companies.match.link.route, linkCompanies)
router.post(urls.companies.match.merge.route, submitMergeRequest)
Expand Down
26 changes: 0 additions & 26 deletions src/apps/companies/apps/match-company/transformers.js

This file was deleted.

0 comments on commit aa4575d

Please sign in to comment.