@@ -5,7 +5,7 @@ import type {
55} from "adminforth" ;
66import clone from 'clone' ;
77
8- import { AdminForthPlugin , parseBody , AdminForthResourcePages , suggestIfTypo } from "adminforth" ;
8+ import { AdminForthPlugin , AdminForthResourcePages , suggestIfTypo } from "adminforth" ;
99import { PluginOptions } from "./types.js" ;
1010import { interpretResource , ActionCheckSource } from "adminforth" ;
1111import { z } from "zod" ;
@@ -62,10 +62,9 @@ export default class ForeignInlineShowPlugin extends AdminForthPlugin {
6262 server . endpoint ( {
6363 method : 'POST' ,
6464 path : `/plugin/${ this . pluginInstanceId } /start_bulk_action` ,
65- handler : async ( { body, adminUser, tr, response : httpResponse } ) => {
66- const parsed = parseBody ( startBulkActionBodySchema , body , httpResponse ) ;
67- if ( 'error' in parsed ) return parsed . error ;
68- const data = parsed . data ;
65+ request_schema : startBulkActionBodySchema ,
66+ handler : async ( { body, adminUser, tr } ) => {
67+ const data = body as z . infer < typeof startBulkActionBodySchema > ;
6968 const { resourceId, actionId, recordIds } = data ;
7069 const resource = this . adminforth . config . resources . find ( ( res ) => res . resourceId == resourceId ) ;
7170 if ( ! resource ) {
0 commit comments