huridocs/uwazi

View on GitHub
app/api/i18n.v2/database/data_source_defaults.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { getConnection } from 'api/common.v2/database/getConnectionForCurrentTenant';
import { MongoTransactionManager } from 'api/common.v2/database/MongoTransactionManager';
import { MongoTranslationsDataSource } from './MongoTranslationsDataSource';

const DefaultTranslationsDataSource = (transactionManager: MongoTransactionManager) => {
  const db = getConnection();
  return new MongoTranslationsDataSource(db, transactionManager);
};

export { DefaultTranslationsDataSource };