Co-authored-by: Sparky Autonomous <sparky@openclaw.ai>
This commit is contained in:
co-authored by
Sparky Autonomous
parent
321b07ab8b
commit
aa5e90ab2a
@@ -54,6 +54,11 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
}
|
||||
|
||||
const [appName, apiEndpoint] = args;
|
||||
|
||||
if (apiEndpoint === "add" && !req.session?.user?.id) {
|
||||
return res.status(401).json({ message: "You must be logged in to do this" });
|
||||
}
|
||||
|
||||
try {
|
||||
/* Absolute path didn't work */
|
||||
const handlerMap = (await import("@calcom/app-store/apps.server.generated")).apiHandlers;
|
||||
|
||||
Reference in New Issue
Block a user