docs(notifcations): docs for intro, notifcations, reprint added
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 2m25s
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 2m25s
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user