mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-11 08:18:37 +01:00
new selfhosted version
This commit is contained in:
8
dashboard/server/api/share/list.ts
Normal file
8
dashboard/server/api/share/list.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { ProjectShareModel, TProjectShare } from "~/shared/schema/project/ProjectShareSchema";
|
||||
|
||||
export default defineEventHandler(async event => {
|
||||
const ctx = await getRequestContext(event, 'pid');
|
||||
const { project_id } = ctx;
|
||||
const list = await ProjectShareModel.find({ project_id });
|
||||
return list.map(e => e.toJSON()) as TProjectShare[];
|
||||
});
|
||||
Reference in New Issue
Block a user