redone admin

added branches
This commit is contained in:
2026-03-25 14:59:44 +01:00
parent 809a37a410
commit c29494dc0d
26 changed files with 1578 additions and 904 deletions

View File

@@ -9,6 +9,7 @@ import {
authRolePermissions,
} from "../../../db/schema"
import { eq, and, or, isNull } from "drizzle-orm"
import { enrichProfilesWithBranches } from "../../utils/profileBranches"
export default async function meRoutes(server: FastifyInstance) {
server.get("/me", async (req, reply) => {
@@ -89,7 +90,8 @@ export default async function meRoutes(server: FastifyInstance) {
)
.limit(1)
profile = profileResult?.[0] ?? null
const enrichedProfiles = await enrichProfilesWithBranches(server, profileResult)
profile = enrichedProfiles?.[0] ?? null
}
// ----------------------------------------------------