Fix script
This commit is contained in:
parent
5b070efc4f
commit
9e55e9ee1e
1 changed files with 6 additions and 9 deletions
|
@ -52,11 +52,7 @@ export function createClient({ host, key }) {
|
|||
body: JSON.stringify(convertObjectKeys(config, snakeCase)),
|
||||
});
|
||||
const data = await res.json();
|
||||
const parsed = responseSchema.parse(data);
|
||||
if (parsed.status === "error") {
|
||||
throw new PostalError(parsed.data.code, parsed.data.message);
|
||||
}
|
||||
return parsed.data;
|
||||
return data;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -85,8 +81,8 @@ for (const sub of unconfirmedSubmissions) {
|
|||
const url = new URL(`${sub.language}/confirm/${sub.confirmationToken}`, process.env.PUBLIC_URL);
|
||||
const values = {
|
||||
subject: title,
|
||||
from: `Let's stop dirty money <vig@re-set.cz>`,
|
||||
to: sub.email,
|
||||
from: `Let's stop dirty money <send@spinaveprachy.cz>`,
|
||||
to: [sub.email],
|
||||
htmlBody: `<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
@ -147,6 +143,7 @@ for (const sub of unconfirmedSubmissions) {
|
|||
</body>
|
||||
</html>`,
|
||||
};
|
||||
console.log("values", values);
|
||||
// mailClient.send(values
|
||||
// console.log("values", values);
|
||||
const result = await mailClient.send(values);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
Reference in a new issue