Skip to content

Commit 5f3370e

Browse files
committed
fix(controller): use HTTP PATCH
1 parent bbc4dea commit 5f3370e

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.vscode/launch.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
{
22
"version": "0.2.0",
33
"configurations": [
4+
{
5+
"name": "OperationsExample",
6+
"type": "coreclr",
7+
"request": "launch",
8+
"preLaunchTask": "build",
9+
"program": "${workspaceRoot}/src/Examples/OperationsExample/bin/Debug/netcoreapp1.0/OperationsExample.dll",
10+
"args": [],
11+
"cwd": "${workspaceRoot}/src/Examples/OperationsExample",
12+
"stopAtEntry": false
13+
},
414
{
515
"name": ".NET Core Attach",
616
"type": "coreclr",

src/Examples/OperationsExample/Controllers/OperationsController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace OperationsExample.Controllers
66
{
7-
[Route("api/[controller]")]
7+
[Route("api/bulk")]
88
public class OperationsController : JsonApiOperationsController
99
{
1010
public OperationsController(IOperationsProcessor processor)

src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public JsonApiOperationsController(IOperationsProcessor operationsProcessor)
1414
_operationsProcessor = operationsProcessor;
1515
}
1616

17-
[HttpPost("bulk")]
17+
[HttpPatch]
1818
public async Task<IActionResult> PatchAsync(OperationsDocument doc)
1919
{
2020
var results = await _operationsProcessor.ProcessAsync(doc.Operations);

0 commit comments

Comments
 (0)