* Add Whereby Boilerplate * Whereby App * around boilerplate * AroundCo App * Add Riverside App * Add Riverside to details * Fix URL validation * Remove Icons * Remove console.log * revert merge * Fix images * Update Iconds to be SVG * Add Disconnect button * Fix type * Fixing i18n merge * Refactor app installations * Update varient * Update default responder + riverside logo * Update apps/web/pages/event-types/[type].tsx Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Omar López <zomars@me.com>
11 lines
289 B
TypeScript
11 lines
289 B
TypeScript
import type { NextApiRequest } from "next";
|
|
|
|
import { HttpError } from "@calcom/lib/http-error";
|
|
|
|
export default function checkSession(req: NextApiRequest) {
|
|
if (!req.session?.user?.id) {
|
|
throw new HttpError({ statusCode: 401, message: "Unauthorized" });
|
|
}
|
|
return req.session;
|
|
}
|