We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e0822f9 + 103842a commit fd745e4Copy full SHA for fd745e4
1 file changed
src/server/api/mutations/getOptOutMessage.js
@@ -1,10 +1,14 @@
1
+import { getConfig } from "../lib/config";
2
import optOutMessageCache from "../../models/cacheable_queries/opt-out-message";
3
import zipStateCache from "../../models/cacheable_queries/zip";
4
5
export const getOptOutMessage = async (
6
_,
7
{ organizationId, zip, defaultMessage }
8
) => {
9
+ if (!getConfig("OPT_OUT_PER_STATE")) {
10
+ return defaultMessage;
11
+ }
12
try {
13
const queryResult = await optOutMessageCache.query({
14
organizationId: organizationId,
0 commit comments