Extend users-permissions /auth/local/register method

System Information
  • Strapi Version: 4.4.0
  • Operating System: Win 10
  • Database: Postgres
  • Node Version: 16.17.0
  • NPM Version:
  • Yarn Version:

I am trying to extend the auth/register method so i can add a custom uuid that is generated upon registering the new user account. I have added the below method but i dont know what return in the method. It will currently give me a 404 error when registering a new user.


module.exports = (plugin) => {
  plugin.controllers.auth.register = (ctx) => {
    console.log('REGISTERING USER =====================================');

    //...custom code here

   return???? <-------------- what do i return here?

  return plugin;