feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - Checkpoint - Remove old attempt at Reynolds Integration in favor of new library.
This commit is contained in:
11
server/rr/withClient.js
Normal file
11
server/rr/withClient.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const { getRRConfigForBodyshop } = require("./rr-config");
|
||||
const { makeRRClient } = require("./rr-client");
|
||||
const logger = require("../utils/logger");
|
||||
|
||||
async function withClient(bodyshopId, fn) {
|
||||
const routing = await getRRConfigForBodyshop(bodyshopId);
|
||||
const client = makeRRClient({ logger });
|
||||
return fn(client, routing);
|
||||
}
|
||||
|
||||
module.exports = { withClient };
|
||||
Reference in New Issue
Block a user