Skip to content

Commit

Permalink
fix(email): notify when designated sender updates
Browse files Browse the repository at this point in the history
  • Loading branch information
BastiDood committed Aug 3, 2024
1 parent e232175 commit 45ada1b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/src/routes/dashboard/email/+page.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ export const actions = {

const data = await request.formData();
const email = validateEmail(data.get('email'));
const upsertDesignatedSender = await db.upsertDesignatedSender(email);
db.logger.info({ upsertDesignatedSender });

await db.begin(async db => {
const upsertDesignatedSender = await db.upsertDesignatedSender(email);
db.logger.info({ upsertDesignatedSender });
await db.notifyDraftChannel();
await db.notifyUserChannel();
});
},
async remove({ locals: { db }, cookies, request }) {
const sid = cookies.get('sid');
Expand Down

0 comments on commit 45ada1b

Please sign in to comment.