From a1e49bf9e489912a1a8c7d7cd148f52572499498 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Tue, 21 Jun 2022 22:42:48 +0200 Subject: [PATCH] add retryWrites w=majority --- db/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/index.ts b/db/index.ts index 7b833d3..51c0d9f 100644 --- a/db/index.ts +++ b/db/index.ts @@ -7,7 +7,7 @@ import { uniqueFilter } from '../helpers/array' let connectedPromise: Promise -export const MONGODB_URI = process.env.MONGODB_URI +export const MONGODB_URI = `${process.env.MONGODB_URI}?retryWrites=true&w=majority` export function connect(): Promise { if (connectedPromise) {