mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
add anomaly + fix billing + add emails templates
This commit is contained in:
@@ -9,9 +9,13 @@ export default defineEventHandler(async event => {
|
||||
if (!project_id) return;
|
||||
|
||||
const user = getRequestUser(event);
|
||||
if (!user?.logged) return setResponseStatus(event, 400, 'User need to be logged');
|
||||
|
||||
const project = await getUserProjectFromId(project_id, user);
|
||||
if (!project) return;
|
||||
|
||||
if (project.owner.toString() != user.id) return setResponseStatus(event, 400, 'You cannot upgrade a project as guest');
|
||||
|
||||
const body = await readBody(event);
|
||||
|
||||
const { planId } = body;
|
||||
|
||||
Reference in New Issue
Block a user