Module exposing: PATCH, DELETE
// Source: https://github.com/Second-Inc/second | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { NextResponse } from "next/server";
import {
guardErrorToApiResponse,
hasWorkspacePermission,
isRequestGuardError,
normalizeObjectId,
requireWorkspaceContext,
} from "@/lib/auth";
import {
auditActorFromWorkspaceContext,
auditSourceFromRequest,
recordAuditEvent,
} from "@/lib/audit/record";
import {
deleteWorkspaceTeam,
findWorkspaceTeamById,
updateWorkspaceTeamName,
} from "@/lib/db";
type TeamRouteContext = {
params: Promise<{
workspaceId: string;
teamId: string;
}>;
};
export async function PATCH(request: Request, context: TeamRouteContext)
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key