You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
869 B
35 lines
869 B
// app/services/sidebar.ts
|
|
// Copyright (C) 2025 DTP Technologies, LLC
|
|
// All Rights Reserved
|
|
|
|
import { Request, Response, NextFunction, RequestHandler } from "express";
|
|
|
|
import {
|
|
DtpPlatform,
|
|
DtpService,
|
|
} from "../../lib/dtplib.js";
|
|
|
|
export class SidebarService extends DtpService {
|
|
static get name ( ) { return "SidebarService"; }
|
|
static get slug ( ) { return "sidebar"; }
|
|
|
|
constructor(platform: DtpPlatform) {
|
|
super(platform, SidebarService);
|
|
}
|
|
|
|
middleware ( ) : RequestHandler {
|
|
return async (_req: Request, _res: Response, next: NextFunction) : Promise<void> => {
|
|
try {
|
|
/*
|
|
* Populate sidebar content here
|
|
*/
|
|
return next();
|
|
} catch (error) {
|
|
this.log.error("Failed to populate sidebar content", { error });
|
|
return next(error);
|
|
}
|
|
};
|
|
}
|
|
}
|
|
|
|
export default SidebarService;
|
|
|