@@ -77,7 +77,7 @@ protected BaseJsonApiController(
77
77
78
78
public virtual async Task < IActionResult > GetAsync ( )
79
79
{
80
- if ( _getAll == null ) throw new JsonApiException ( 405 , "Query requests are not supported" ) ;
80
+ if ( _getAll == null ) throw new JsonApiException ( 405 , "Get requests are not supported" ) ;
81
81
82
82
var entities = await _getAll . GetAsync ( ) ;
83
83
@@ -86,7 +86,7 @@ public virtual async Task<IActionResult> GetAsync()
86
86
87
87
public virtual async Task < IActionResult > GetAsync ( TId id )
88
88
{
89
- if ( _getById == null ) throw new JsonApiException ( 405 , "Query requests are not supported" ) ;
89
+ if ( _getById == null ) throw new JsonApiException ( 405 , "Get by Id requests are not supported" ) ;
90
90
91
91
var entity = await _getById . GetAsync ( id ) ;
92
92
@@ -98,7 +98,7 @@ public virtual async Task<IActionResult> GetAsync(TId id)
98
98
99
99
public virtual async Task < IActionResult > GetRelationshipsAsync ( TId id , string relationshipName )
100
100
{
101
- if ( _getRelationships == null ) throw new JsonApiException ( 405 , "Query requests are not supported" ) ;
101
+ if ( _getRelationships == null ) throw new JsonApiException ( 405 , "Get Relationships requests are not supported" ) ;
102
102
103
103
var relationship = await _getRelationships . GetRelationshipsAsync ( id , relationshipName ) ;
104
104
if ( relationship == null )
@@ -109,7 +109,7 @@ public virtual async Task<IActionResult> GetRelationshipsAsync(TId id, string re
109
109
110
110
public virtual async Task < IActionResult > GetRelationshipAsync ( TId id , string relationshipName )
111
111
{
112
- if ( _getRelationship == null ) throw new JsonApiException ( 405 , "Query requests are not supported" ) ;
112
+ if ( _getRelationship == null ) throw new JsonApiException ( 405 , "Get Relationship requests are not supported" ) ;
113
113
114
114
var relationship = await _getRelationship . GetRelationshipAsync ( id , relationshipName ) ;
115
115
@@ -118,7 +118,7 @@ public virtual async Task<IActionResult> GetRelationshipAsync(TId id, string rel
118
118
119
119
public virtual async Task < IActionResult > PostAsync ( [ FromBody ] T entity )
120
120
{
121
- if ( _create == null ) throw new JsonApiException ( 405 , "Command requests are not supported" ) ;
121
+ if ( _create == null ) throw new JsonApiException ( 405 , "Post requests are not supported" ) ;
122
122
123
123
if ( entity == null )
124
124
return UnprocessableEntity ( ) ;
@@ -133,7 +133,7 @@ public virtual async Task<IActionResult> PostAsync([FromBody] T entity)
133
133
134
134
public virtual async Task < IActionResult > PatchAsync ( TId id , [ FromBody ] T entity )
135
135
{
136
- if ( _update == null ) throw new JsonApiException ( 405 , "Command requests are not supported" ) ;
136
+ if ( _update == null ) throw new JsonApiException ( 405 , "Patch requests are not supported" ) ;
137
137
138
138
if ( entity == null )
139
139
return UnprocessableEntity ( ) ;
@@ -148,7 +148,7 @@ public virtual async Task<IActionResult> PatchAsync(TId id, [FromBody] T entity)
148
148
149
149
public virtual async Task < IActionResult > PatchRelationshipsAsync ( TId id , string relationshipName , [ FromBody ] List < DocumentData > relationships )
150
150
{
151
- if ( _updateRelationships == null ) throw new JsonApiException ( 405 , "Command requests are not supported" ) ;
151
+ if ( _updateRelationships == null ) throw new JsonApiException ( 405 , "Relationship Patch requests are not supported" ) ;
152
152
153
153
await _updateRelationships . UpdateRelationshipsAsync ( id , relationshipName , relationships ) ;
154
154
@@ -157,7 +157,7 @@ public virtual async Task<IActionResult> PatchRelationshipsAsync(TId id, string
157
157
158
158
public virtual async Task < IActionResult > DeleteAsync ( TId id )
159
159
{
160
- if ( _delete == null ) throw new JsonApiException ( 405 , "Command requests are not supported" ) ;
160
+ if ( _delete == null ) throw new JsonApiException ( 405 , "Delete requests are not supported" ) ;
161
161
162
162
var wasDeleted = await _delete . DeleteAsync ( id ) ;
163
163
0 commit comments