mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-11 08:18:37 +01:00
new selfhosted version
This commit is contained in:
9
dashboard/server/api/ai/insight.ts
Normal file
9
dashboard/server/api/ai/insight.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { AiService } from "~/server/services/ai/AiService";
|
||||
|
||||
export default defineEventHandler(async event => {
|
||||
|
||||
const ctx = await getRequestContext(event, 'pid', 'permission:ai');
|
||||
const { project_id } = ctx;
|
||||
const res = await AiService.generateInsight(project_id.toString());
|
||||
return res;
|
||||
});
|
||||
Reference in New Issue
Block a user