@@ -77,7 +77,7 @@ protected BaseJsonApiController(
7777
7878 public virtual async Task < IActionResult > GetAsync ( )
7979 {
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" ) ;
8181
8282 var entities = await _getAll . GetAsync ( ) ;
8383
@@ -86,7 +86,7 @@ public virtual async Task<IActionResult> GetAsync()
8686
8787 public virtual async Task < IActionResult > GetAsync ( TId id )
8888 {
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" ) ;
9090
9191 var entity = await _getById . GetAsync ( id ) ;
9292
@@ -98,7 +98,7 @@ public virtual async Task<IActionResult> GetAsync(TId id)
9898
9999 public virtual async Task < IActionResult > GetRelationshipsAsync ( TId id , string relationshipName )
100100 {
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" ) ;
102102
103103 var relationship = await _getRelationships . GetRelationshipsAsync ( id , relationshipName ) ;
104104 if ( relationship == null )
@@ -109,7 +109,7 @@ public virtual async Task<IActionResult> GetRelationshipsAsync(TId id, string re
109109
110110 public virtual async Task < IActionResult > GetRelationshipAsync ( TId id , string relationshipName )
111111 {
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" ) ;
113113
114114 var relationship = await _getRelationship . GetRelationshipAsync ( id , relationshipName ) ;
115115
@@ -118,7 +118,7 @@ public virtual async Task<IActionResult> GetRelationshipAsync(TId id, string rel
118118
119119 public virtual async Task < IActionResult > PostAsync ( [ FromBody ] T entity )
120120 {
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" ) ;
122122
123123 if ( entity == null )
124124 return UnprocessableEntity ( ) ;
@@ -133,7 +133,7 @@ public virtual async Task<IActionResult> PostAsync([FromBody] T entity)
133133
134134 public virtual async Task < IActionResult > PatchAsync ( TId id , [ FromBody ] T entity )
135135 {
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" ) ;
137137
138138 if ( entity == null )
139139 return UnprocessableEntity ( ) ;
@@ -148,7 +148,7 @@ public virtual async Task<IActionResult> PatchAsync(TId id, [FromBody] T entity)
148148
149149 public virtual async Task < IActionResult > PatchRelationshipsAsync ( TId id , string relationshipName , [ FromBody ] List < DocumentData > relationships )
150150 {
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" ) ;
152152
153153 await _updateRelationships . UpdateRelationshipsAsync ( id , relationshipName , relationships ) ;
154154
@@ -157,7 +157,7 @@ public virtual async Task<IActionResult> PatchRelationshipsAsync(TId id, string
157157
158158 public virtual async Task < IActionResult > DeleteAsync ( TId id )
159159 {
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" ) ;
161161
162162 var wasDeleted = await _delete . DeleteAsync ( id ) ;
163163
0 commit comments