File tree Expand file tree Collapse file tree
packages/runtime/server/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ export function createNodeHandler(app: IObjectQL) {
105105 await handleRequest ( {
106106 op : 'findOne' ,
107107 object : objectName ,
108- args : { filters : [ [ '_id' , '=' , id ] ] } // Assuming _id or id mapping
108+ args : id
109109 } ) ;
110110 }
111111 // GET /api/data/:object -> find (List)
Original file line number Diff line number Diff line change @@ -61,11 +61,7 @@ export class ObjectQLServer {
6161 break ;
6262 case 'findOne' :
6363 // Support both string ID and query object
64- if ( typeof req . args === 'string' ) {
65- result = await repo . findOne ( { filters : [ [ '_id' , '=' , req . args ] ] } ) ;
66- } else {
67- result = await repo . findOne ( req . args ) ;
68- }
64+ result = await repo . findOne ( req . args ) ;
6965 break ;
7066 case 'create' :
7167 result = await repo . create ( req . args ) ;
You can’t perform that action at this time.
0 commit comments