mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
update
This commit is contained in:
20
dashboard/server/api/report/customization.ts
Normal file
20
dashboard/server/api/report/customization.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
import { ReportCustomizationModel, TReportCustomization } from "~/shared/schema/report/ReportCustomizationSchema";
|
||||
|
||||
export default defineEventHandler(async event => {
|
||||
const data = await getRequestData(event, []);
|
||||
if (!data) return;
|
||||
|
||||
const customization = await ReportCustomizationModel.findOne({ project_id: data.project_id });
|
||||
|
||||
if (!customization) return {
|
||||
_id: '' as any,
|
||||
project_id: data.project_id.toString() as any,
|
||||
bg: 'black',
|
||||
logo: undefined,
|
||||
text: 'white'
|
||||
} as TReportCustomization;
|
||||
|
||||
return customization.toJSON() as TReportCustomization;
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user