Skip to content

Commit

Permalink
DOP-4599 fix db name
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed May 10, 2024
1 parent c0e5341 commit 7086c63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion api/controllers/v1/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const DisplayRepoOptions = async (event: APIGatewayEvent): Promise<APIGat
const client = new mongodb.MongoClient(c.get('dbUrl'));
await client.connect();
const db = client.db(process.env.DB_NAME);
const projectsRepository = new ProjectsRepository(client.db('docs_metada'), c, consoleLogger);
const projectsRepository = new ProjectsRepository(client.db('docs_metadata'), c, consoleLogger);
const repoEntitlementRepository = new RepoEntitlementsRepository(db, c, consoleLogger);
const repoBranchesRepository = new RepoBranchesRepository(db, c, consoleLogger);
const key_val = getQSString(event.body);
Expand All @@ -46,6 +46,7 @@ export const DisplayRepoOptions = async (event: APIGatewayEvent): Promise<APIGat
if (isAdmin) {
const repos = await repoBranchesRepository.getProdDeployableRepoBranches();
//add checks for all of these things existing
console.log(projectsRepository);
for (const repo of repos) {
const projectEntry = await projectsRepository.getProjectEntry(repo.project);
console.log(projectEntry, repo.project);
Expand Down
2 changes: 1 addition & 1 deletion src/repositories/projectsRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class ProjectsRepository extends BaseRepository {
const query = { name: name };
const projectEntry = await this.findOne(
query,
`Mongo Timeout Error: Timedout while retrieving branches for ${name}
`Mongo Timeout Error: Timed out while retrieving branches for ${name}
}`
);
return projectEntry;
Expand Down

0 comments on commit 7086c63

Please sign in to comment.