Skip to content

Commit

Permalink
Clean up responses
Browse files Browse the repository at this point in the history
- Clean up the response description lang file, remove dashes and use underscore consistently
  • Loading branch information
deanblackborough committed Jun 20, 2022
1 parent 615b3ec commit aaa484b
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/HttpOptionResponse/ErrorLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ErrorLog extends Response
public function create()
{
$get = new \App\HttpVerb\Get();
$this->verbs['GET'] = $get->setDescription('route-descriptions.request_GET_error-log')->
$this->verbs['GET'] = $get->setDescription('route-descriptions.request_GET_error_log')->
setAuthenticationStatus($this->permissions['view'])->
option();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function create()
setDynamicFields($this->allowed_fields)->
setAuthenticationRequirement(true)->
setAuthenticationStatus($this->permissions['manage'])->
setDescription('route-descriptions.item_category_POST_allocated-expense')->
setDescription('route-descriptions.item_category_POST_allocated_expense')->
option();

return $this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function create()
setDynamicFields($this->allowed_fields)->
setAuthenticationRequirement(true)->
setAuthenticationStatus($this->permissions['manage'])->
setDescription('route-descriptions.item_category_POST_simple-expense')->
setDescription('route-descriptions.item_category_POST_simple_expense')->
option();

return $this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function create()
$post = new \App\HttpVerb\Post();
$this->verbs['POST'] = $post->setFields(Config::get('api.item-subcategory.fields-post'))->
setDynamicFields($this->allowed_fields)->
setDescription('route-descriptions.item_sub_category_POST_allocated-expense')->
setDescription('route-descriptions.item_sub_category_POST_allocated_expense')->
setAuthenticationStatus($this->permissions['manage'])->
setAuthenticationRequirement(true)->
option();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function create()
$post = new \App\HttpVerb\Post();
$this->verbs['POST'] = $post->setFields(Config::get('api.item-subcategory.fields-post'))->
setDynamicFields($this->allowed_fields)->
setDescription('route-descriptions.item_sub_category_POST_simple-expense')->
setDescription('route-descriptions.item_sub_category_POST_simple_expense')->
setAuthenticationStatus($this->permissions['manage'])->
setAuthenticationRequirement(true)->
option();
Expand Down
2 changes: 1 addition & 1 deletion app/HttpOptionResponse/SummaryResourceCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function create()
{
$get = new \App\HttpVerb\Get();
$this->verbs['GET'] = $get->setParameters(Config::get('api.resource.summary-parameters'))->
setDescription('route-descriptions.summary-resource-GET-index')->
setDescription('route-descriptions.summary_resource_GET_index')->
setAuthenticationStatus($this->permissions['view'])->
setSearchableParameters(Config::get('api.resource.summary-searchable'))->
option();
Expand Down
2 changes: 1 addition & 1 deletion app/HttpOptionResponse/SummaryResourceTypeCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function create()
{
$get = new \App\HttpVerb\Get();
$this->verbs['GET'] = $get->setParameters(Config::get('api.resource-type.summary-parameters'))->
setDescription('route-descriptions.summary-resource-type-GET-index')->
setDescription('route-descriptions.summary_resource_type_GET_index')->
setAuthenticationStatus($this->permissions['view'])->
setSearchableParameters(Config::get('api.resource-type.summary-searchable'))->
option();
Expand Down
14 changes: 7 additions & 7 deletions resources/lang/en/route-descriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
'item_category_GET_index' => 'Return the category assigned to the selected item',
'item_category_GET_show' => 'Return the category assigned to the selected item',

'item_category_POST_allocated-expense' => 'Assign a maximum of one category to the selected allocated-expense',
'item_category_POST_simple-expense' => 'Assign a maximum of one category to the selected simple-expense',
'item_category_POST_allocated_expense' => 'Assign a maximum of one category to the selected allocated-expense',
'item_category_POST_simple_expense' => 'Assign a maximum of one category to the selected simple-expense',
'item_category_POST_game' => 'Assign the categories (players) to the selected game',

'item_category_PATCH' => 'Update the category assigned to the selected item',
Expand All @@ -76,8 +76,8 @@
'item_sub_category_GET_index' => 'Return the subcategory assigned to the selected item',
'item_sub_category_GET_show' => 'Return the subcategory assigned to the selected item',

'item_sub_category_POST_allocated-expense' => 'Assign a maximum of one subcategory to the selected allocated-expense',
'item_sub_category_POST_simple-expense' => 'Assign a maximum of one subcategory to the selected simple-expense',
'item_sub_category_POST_allocated_expense' => 'Assign a maximum of one subcategory to the selected allocated-expense',
'item_sub_category_POST_simple_expense' => 'Assign a maximum of one subcategory to the selected simple-expense',

'item_sub_category_PATCH' => 'Update the subcategory assigned to the selected item',
'item_sub_category_DELETE' => 'Delete the subcategory assigned to the selected item',
Expand All @@ -96,16 +96,16 @@
'permitted_user_POST' => 'Assign a permitted user',
'permitted_user_DELETE' => 'Delete the selected permitted user',

'request_GET_error-log' => 'Return the error log',
'request_GET_error_log' => 'Return the error log',
'request_GET_cache' => 'Return the number of cached keys for the authenticated user',
'request_DELETE_cache' => 'Attempt to delete the cached keys for the authenticated user',
'request_POST' => 'Create an error log report',

'summary_category_GET_index' => 'Return a summary of the categories',
'summary_subcategory_GET_index' => 'Return a summary of the subcategories',

'summary-resource-type-GET-index' => 'Return a summary of the resource types',
'summary-resource-GET-index' => 'Return a summary of the resources',
'summary_resource_type_GET_index' => 'Return a summary of the resource types',
'summary_resource_GET_index' => 'Return a summary of the resources',

'summary_items_GET_index'=> 'Return the "item" summary for the selected resource, review summary filters for all summary options',
'summary_resource_type_items_GET_index'=> 'Return the "item" summary for the selected resource type, items for all resources are summarised, review summary filters for all summary options',
Expand Down

0 comments on commit aaa484b

Please sign in to comment.