Skip to content

Commit

Permalink
Merge pull request #2491 from aflcio/opt-out-error
Browse files Browse the repository at this point in the history
Avoid error on opt-out
  • Loading branch information
mau11 authored Oct 18, 2024
2 parents e0822f9 + 103842a commit fd745e4
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 fd745e4

Please sign in to comment.