fix: review fixes for MCP and API key feature
- Remove spurious ALTER TABLE client_targets DROP DEFAULT from migration (Prisma schema drift side-effect unrelated to this PR) - Surface revoke errors in ApiKeysPage UI via deleteApiKey.isError - Fix UpdateProjectInput.color type to allow null, removing unsafe cast in the update_project MCP tool handler
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "client_targets" ALTER COLUMN "working_days" DROP DEFAULT;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "api_keys" (
|
||||
"id" TEXT NOT NULL,
|
||||
|
||||
@@ -139,15 +139,8 @@ function buildMcpServer(user: AuthenticatedUser): McpServer {
|
||||
clientId: z.string().uuid().optional().describe('Move project to a different client'),
|
||||
},
|
||||
},
|
||||
async (args) => {
|
||||
const { id, ...rest } = args as {
|
||||
id: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
color?: string | null;
|
||||
clientId?: string;
|
||||
};
|
||||
const project = await projectService.update(id, userId, rest as import('../types').UpdateProjectInput);
|
||||
async ({ id, name, description, color, clientId }) => {
|
||||
const project = await projectService.update(id, userId, { name, description, color, clientId });
|
||||
return { content: [{ type: 'text', text: JSON.stringify(project, null, 2) }] };
|
||||
}
|
||||
);
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface CreateProjectInput {
|
||||
export interface UpdateProjectInput {
|
||||
name?: string;
|
||||
description?: string;
|
||||
color?: string;
|
||||
color?: string | null;
|
||||
clientId?: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user