Can not access database in back end

Hello. I have a problem in accessing database in backend. I failed to access database in backend while I successed in the front end with the same code. The code is:

wixData . query ( “sdfsfdsd” )
. find ().
then (( results ) =>{
return results ;
})

Is the back end Admin? However sdfsfdsd just a normal collection created for test.
Please help me if you know anything?

You need an extra return , something like this:

return wixData.query("sdfsfdsd")
.find()
.then((results)=>{
   return results;
})

See Returning in a .then( ) for more information.

Thanks so much! It works!