@@ -14,7 +14,7 @@ public static WebKernel MapQuery<TModule, TQuery, TReadModel>(this WebKernel web
1414 where TQuery : Query < TModule , TReadModel >
1515 where TReadModel : ReadModel
1616 {
17- webKernel . App . MapPost ( typeof ( TModule ) . Name + "/_queries/ " + typeof ( TQuery ) . Name , async ( [ FromBody ] TQuery query , IModuleExecutor < TModule > executor , CancellationToken cancellationToken ) =>
17+ webKernel . App . MapGet ( "api/" + typeof ( TModule ) . Name + "/" + typeof ( TQuery ) . Name , async ( [ AsParameters ] TQuery query , IModuleExecutor < TModule > executor , CancellationToken cancellationToken ) =>
1818 {
1919 var queryResult = await executor . Execute ( query , cancellationToken ) ;
2020
@@ -35,7 +35,7 @@ public static WebKernel MapCommand<TModule, TCommand>(this WebKernel webKernel)
3535 where TModule : EasyWayModule
3636 where TCommand : Command < TModule >
3737 {
38- webKernel . App . MapPost ( typeof ( TModule ) . Name + "/_commands /" + typeof ( TCommand ) . Name , async ( [ FromBody ] TCommand command , IModuleExecutor < TModule > executor , CancellationToken cancellationToken ) =>
38+ webKernel . App . MapPost ( "api/" + typeof ( TModule ) . Name + "/" + typeof ( TCommand ) . Name , async ( [ FromBody ] TCommand command , IModuleExecutor < TModule > executor , CancellationToken cancellationToken ) =>
3939 {
4040 var commandResult = await executor . Execute ( command , cancellationToken ) ;
4141
@@ -55,7 +55,7 @@ public static WebKernel MapCommand<TModule, TCommand, TCommandResult>(this WebKe
5555 where TCommand : Command < TModule , TCommandResult >
5656 where TCommandResult : OperationResult
5757 {
58- webKernel . App . MapPost ( typeof ( TModule ) . Name + "/_commands /" + typeof ( TCommand ) . Name , async ( [ FromBody ] TCommand command , IModuleExecutor < TModule > executor , CancellationToken cancellationToken ) =>
58+ webKernel . App . MapPost ( "api/" + typeof ( TModule ) . Name + "/" + typeof ( TCommand ) . Name , async ( [ FromBody ] TCommand command , IModuleExecutor < TModule > executor , CancellationToken cancellationToken ) =>
5959 {
6060 var commandResult = await executor . Execute ( command , cancellationToken ) ;
6161
0 commit comments