mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
9 lines
371 B
TypeScript
9 lines
371 B
TypeScript
import { ProjectShareModel, TProjectShare } from "~/shared/schema/project/ProjectShareSchema";
|
|
|
|
export default defineEventHandler(async event => {
|
|
const ctx = await getRequestContext(event, 'pid');
|
|
const { project_id } = ctx;
|
|
const { id } = getQuery(event);
|
|
if (!id) return;
|
|
await ProjectShareModel.deleteOne({ _id: id?.toString(), project_id });
|
|
});
|