@@ -59,7 +59,7 @@ export default function carsResourseTemplate(resourceId: string, dataSource: str
5959 inputSuffix : 'USD' ,
6060 allowMinMaxQuery : true ,
6161 editingNote : 'Price is in USD' ,
62- type : AdminForthDataTypes . FLOAT ,
62+ type : AdminForthDataTypes . DECIMAL ,
6363 required : true ,
6464 } ,
6565 {
@@ -73,12 +73,10 @@ export default function carsResourseTemplate(resourceId: string, dataSource: str
7373 name : 'engine_type' ,
7474 type : AdminForthDataTypes . STRING ,
7575 label : 'Engine Type' ,
76- allowMinMaxQuery : true ,
7776 enum : ENGINE_TYPES ,
7877 } ,
7978 {
8079 name : 'engine_power' ,
81- allowMinMaxQuery : true ,
8280 type : AdminForthDataTypes . INTEGER ,
8381 inputSuffix : 'HP' ,
8482 showIf : { engine_type : { $not : 'electric' } } ,
@@ -87,6 +85,7 @@ export default function carsResourseTemplate(resourceId: string, dataSource: str
8785 {
8886 name : 'production_year' ,
8987 type : AdminForthDataTypes . INTEGER ,
88+ allowMinMaxQuery : true ,
9089 minValue : 1900 ,
9190 maxValue : new Date ( ) . getFullYear ( ) ,
9291 } ,
@@ -341,7 +340,7 @@ export default function carsResourseTemplate(resourceId: string, dataSource: str
341340 {
342341 name : 'Approve Listing' ,
343342 icon : 'flowbite:check-outline' ,
344- action : async ( { recordId, adminUser, adminforth, extra } ) => {
343+ action : async ( { recordId, adminUser, adminforth, extra, response } ) => {
345344 //@ts -ignore
346345 const verificationResult = extra ?. verificationResult
347346 if ( ! verificationResult ) {
@@ -351,7 +350,9 @@ export default function carsResourseTemplate(resourceId: string, dataSource: str
351350 const result = await t2fa . verify ( verificationResult , {
352351 adminUser : adminUser ,
353352 userPk : adminUser . pk as string ,
354- cookies : extra . cookies
353+ cookies : extra . cookies ,
354+ response : response ,
355+ extra : extra ,
355356 } ) ;
356357
357358
0 commit comments