@@ -13,13 +13,25 @@ internal static class PersistedQueryMiddleware
13
13
internal static void MapPersistedQueryMiddleware ( this RouteGroupBuilder groupBuilder , string schemaName )
14
14
{
15
15
var state = new State ( schemaName ) ;
16
-
16
+
17
+ groupBuilder
18
+ . MapGet (
19
+ "/{OperationId}" ,
20
+ ( [ AsParameters ] Services services , string operationId )
21
+ => ExecuteGetRequestAsync ( state , services , operationId , null ) ) ;
22
+
17
23
groupBuilder
18
24
. MapGet (
19
25
"/{OperationId}/{DisplayName}" ,
20
26
( [ AsParameters ] Services services , string operationId , string displayName )
21
27
=> ExecuteGetRequestAsync ( state , services , operationId , displayName ) ) ;
22
28
29
+ groupBuilder
30
+ . MapPost (
31
+ "/{OperationId}" ,
32
+ ( [ AsParameters ] Services services , string operationId )
33
+ => ExecutePostRequestAsync ( state , services , operationId , null ) ) ;
34
+
23
35
groupBuilder
24
36
. MapPost (
25
37
"/{OperationId}/{DisplayName}" ,
@@ -32,7 +44,7 @@ private static async Task ExecuteGetRequestAsync(
32
44
Services services ,
33
45
string operationId ,
34
46
// ReSharper disable once UnusedParameter.Local
35
- string displayName )
47
+ string ? displayName )
36
48
{
37
49
HttpStatusCode ? statusCode ;
38
50
IExecutionResult ? result ;
@@ -108,7 +120,7 @@ private static async Task ExecutePostRequestAsync(
108
120
Services services ,
109
121
string operationId ,
110
122
// ReSharper disable once UnusedParameter.Local
111
- string displayName )
123
+ string ? displayName )
112
124
{
113
125
HttpStatusCode ? statusCode ;
114
126
IExecutionResult ? result ;
0 commit comments