Retrieve an array of ID from relation


First of all sorry for my english.

I’ve a question about Strapi and i can’t find answers.

I’ve two models:

  • favorites
  • users (from the plugin)

And the relation belongs-to-many between them.

I want to custom the controller method “/auth/me” to retrieve the favorites ID only, but i’ve always all favorite informations.

How can i retrieve an array of ID from relation ?

Thanks for all,