We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 062f38a commit 4cb3e90Copy full SHA for 4cb3e90
apps/studio/src/server/modules/resource/resource.router.ts
@@ -294,6 +294,17 @@ export const resourceRouter = router({
294
})
295
}
296
297
+ if (
298
+ parent.type === ResourceType.Collection &&
299
+ toMove.type !== ResourceType.CollectionPage &&
300
+ toMove.type !== ResourceType.CollectionLink
301
+ ) {
302
+ throw new TRPCError({
303
+ code: "BAD_REQUEST",
304
+ message: "Folder items can only be moved to another folder",
305
+ })
306
+ }
307
+
308
if (movedResourceId === destinationResourceId) {
309
throw new TRPCError({ code: "BAD_REQUEST" })
310
0 commit comments