mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
[CORL-331] Better tests with types (#2270)
* feat: suspending, banning, now propogation * feat: new mutation api with hooks support * feat: better types in tests and refactor * fix: lint
This commit is contained in:
@@ -5,10 +5,9 @@ import { InternalError } from "talk-server/errors";
|
||||
|
||||
export async function createMongoClient(config: Config): Promise<MongoClient> {
|
||||
try {
|
||||
return await MongoClient.connect(
|
||||
config.get("mongodb"),
|
||||
{ useNewUrlParser: true }
|
||||
);
|
||||
return await MongoClient.connect(config.get("mongodb"), {
|
||||
useNewUrlParser: true,
|
||||
});
|
||||
} catch (err) {
|
||||
throw new InternalError(err, "could not connect to mongodb");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user