fix(app): emit.maxlistener issue
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m27s
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m27s
BREAKING CHANGE: moved teh middleware to call the api hits to the main app and removed from everywhere else closes #18
This commit is contained in:
@@ -10,7 +10,7 @@ export async function generateUniquePin() {
|
||||
const pin = generateSixDigitPin();
|
||||
|
||||
const existing = await db.query.scanUser.findFirst({
|
||||
where: (u, { eq }) => eq(u.pinHash, pin), // ⚠️ we'll fix this below
|
||||
where: (u, { eq }) => eq(u.pinHash, pin),
|
||||
});
|
||||
|
||||
if (!existing)
|
||||
@@ -37,3 +37,13 @@ export async function generateUniquePin() {
|
||||
room: "",
|
||||
});
|
||||
}
|
||||
|
||||
// export const pinExists = async (pin: string | number) => {
|
||||
// const existing = await db.query.scanUser.findFirst({
|
||||
// where: (u, { eq }) => eq(u.pinHash, pin),
|
||||
// });
|
||||
|
||||
// if (!existing) return true;
|
||||
|
||||
// return false;
|
||||
// };
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import type { Express } from "express";
|
||||
import { routeHitMiddleware } from "../middleware/routeHit.middleware.js";
|
||||
|
||||
import getActiveJobs from "./cronerActiveJobs.route.js";
|
||||
import jobStatusChange from "./cronerStatusChange.route.js";
|
||||
export const setupUtilsRoutes = (baseUrl: string, app: Express) => {
|
||||
app.use(routeHitMiddleware);
|
||||
app.use(`${baseUrl}/api/utils/croner`, getActiveJobs);
|
||||
app.use(`${baseUrl}/api/utils/croner`, jobStatusChange);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user