docs(notifcations): docs for intro, notifcations, reprint added
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 2m25s

This commit is contained in:
2026-04-10 21:35:12 -05:00
parent 38a0b65e94
commit 87f738702a
15 changed files with 1711 additions and 8 deletions

View File

@@ -9,11 +9,15 @@ import {
import { returnFunc } from "../utils/returnHelper.utils.js";
import { sendEmail } from "../utils/sendEmail.utils.js";
import { tryCatch } from "../utils/trycatch.utils.js";
import { v1QueryRun } from "../utils/pgConnectToLst.utils.js";
import { v2QueryRun } from "../utils/pgConnectToLst.utils.js";
const reprint = async (data: any, emails: string) => {
// TODO: remove this disable once all 17 plants are on this new lst
v1QueryRun(`update public.notifications set active = false where name = '${data.name}'`)
let shutoffv1 = false
const func = async (data: any, emails: string) => {
// TODO: remove this disable once all 17 plants are on this new lst
if (!shutoffv1){
v2QueryRun(`update public.notifications set active = false where name = '${data.name}'`)
shutoffv1 = true
}
const { data: l, error: le } = (await tryCatch(
db.select().from(notifications).where(eq(notifications.id, data.id)),
@@ -106,4 +110,4 @@ const reprint = async (data: any, emails: string) => {
}
};
export default reprint;
export default func;