feat(modules): modules added to frontend
This commit is contained in:
@@ -8,17 +8,7 @@ router.get("/:userId", async (req: Request, res: Response) => {
|
||||
const cookieHeader = req.headers.cookie ?? "";
|
||||
const authorization = req.headers.authorization ?? "";
|
||||
|
||||
const data = await auth.api.setUserPassword({
|
||||
body: {
|
||||
newPassword: req.body.password, // required
|
||||
userId: userId, // required
|
||||
},
|
||||
// This endpoint requires session cookies.
|
||||
headers: {
|
||||
cookie: cookieHeader,
|
||||
authorization,
|
||||
},
|
||||
});
|
||||
//session stuff
|
||||
|
||||
return res.status(200).json({ message: "Password was just changed." });
|
||||
});
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{
|
||||
"name": "rfidReaders",
|
||||
"category": "production",
|
||||
"icon": "Tags",
|
||||
"icon": "Tag",
|
||||
"link": "/lst/app/old/rfid",
|
||||
"active": false,
|
||||
"roles": ["viewer", "manager", "tester", "systemAdmin", "admin"]
|
||||
@@ -91,7 +91,7 @@
|
||||
"name": "production",
|
||||
"category": "production",
|
||||
"active": false,
|
||||
"icon": "",
|
||||
"icon": "Tags",
|
||||
"link": "",
|
||||
"roles": ["admin", "systemAdmin", "manager", "viewer", "tester"]
|
||||
},
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { and, asc, eq } from "drizzle-orm";
|
||||
import { asc } from "drizzle-orm";
|
||||
import type { Request, Response } from "express";
|
||||
import { Router } from "express";
|
||||
import { db } from "../../../../pkg/db/db.js";
|
||||
import { modules } from "../../../../pkg/db/schema/modules.js";
|
||||
import { serverData } from "../../../../pkg/db/schema/servers.js";
|
||||
|
||||
import { tryCatch } from "../../../../pkg/utils/tryCatch.js";
|
||||
|
||||
const router = Router();
|
||||
@@ -24,6 +24,7 @@ router.get("/", async (req: Request, res: Response) => {
|
||||
.select()
|
||||
.from(modules)
|
||||
//.where(and(...conditions))
|
||||
//.groupBy(modules.category)
|
||||
.orderBy(asc(modules.name)),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user