Skip to content

Commit e0c870f

Browse files
committed
fix: dashboard patch api should not allow 'id' in updates
1 parent f05e58a commit e0c870f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/api/src/routers/api/dashboards.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
DashboardSchema,
3-
DashboardWithoutIdSchema,
4-
} from '@hyperdx/common-utils/dist/types';
1+
import { DashboardWithoutIdSchema } from '@hyperdx/common-utils/dist/types';
52
import express from 'express';
63
import { groupBy } from 'lodash';
74
import _ from 'lodash';
@@ -59,7 +56,7 @@ router.patch(
5956
params: z.object({
6057
id: objectIdSchema,
6158
}),
62-
body: DashboardSchema.partial(),
59+
body: DashboardWithoutIdSchema.partial(),
6360
}),
6461
async (req, res, next) => {
6562
try {

0 commit comments

Comments
 (0)