Skip to content

Commit

Permalink
Avoid error on opt-out
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffm2001 committed Oct 15, 2024
1 parent 7ce0e22 commit 103842a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/api/mutations/getOptOutMessage.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { getConfig } from "../lib/config";
import optOutMessageCache from "../../models/cacheable_queries/opt-out-message";
import zipStateCache from "../../models/cacheable_queries/zip";

export const getOptOutMessage = async (
_,
{ organizationId, zip, defaultMessage }
) => {
if (!getConfig("OPT_OUT_PER_STATE")) {
return defaultMessage;
}
try {
const queryResult = await optOutMessageCache.query({
organizationId: organizationId,
Expand Down

0 comments on commit 103842a

Please sign in to comment.