Ajax request is fetching sourcecode instead of result of method

Hello,
I’m new to Nextcloud app development, so I started with the tutorial on youtube from KennyKarma52 which is based on the offcial nextcloud tutorial.
Unfortunately the ajax request is fetching the source code from the dashboard and displays it in the alert popup. But it should fetch the result from the method of the note controller . So why is the source code displayed and why is the dashboard fetched and not the notecontroller?

Here is the route

<?php
return [
    'routes' => [
	   ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
	   ['name' => 'note#create', 'url' => '/notes', 'verb' => 'POST'],
    ]
];

Here is the ajax request

var baseUrl = OC.generateUrl('/apps/datamanager');
var note = {
    title: 'New note',
    content: 'This is the note text'
};
$.ajax({
    url: baseUrl + '/notes/',
    type: 'POST',
    contentType: 'application/json',
    data: JSON.stringify(note)
}).done(function (response) {
    alert(response);
}).fail(function (response, code) {
    alert(code + response);
});

In a former thread it was recommended to use method instead of type in the ajax request, but this did not work for me either.
Here the notecontroller

<?php
 namespace OCA\DataManager\Controller;

 use OCP\IRequest;
 use OCP\AppFramework\Controller;
 use OCP\AppFramework\Http;
 use OCP\AppFramework\Http\DataResponse;

 class NoteController extends Controller {

     public function __construct(string $AppName, IRequest $request){
         parent::__construct($AppName, $request);
     }

      /**
      * @NoAdminRequired
      *
      * @param string $title
      * @param string $content
      */
     public function create(string $title, string $content) {
         return new DataResponse("ID1");
     }

 }

Nextcloud version (22.0.0):
Operating system and version (Ubuntu 19.3):
Apache or nginx version (Apache 2.4.29):
PHP version (7.4):

As you can see, i am using a “normal” nextcloud installation with Apache, no Composer, no php console, …

Thank you for your support