Rename the "create" method of controllers to "store"

This commit is contained in:
Alex Tselegidis 2023-10-26 05:41:25 +02:00
parent 058f1b3e97
commit 4b18b78e69
27 changed files with 63 additions and 63 deletions

View file

@ -109,9 +109,9 @@ class Admins extends EA_Controller {
}
/**
* Create an admin.
* Store a new admin.
*/
public function create()
public function store()
{
try
{

View file

@ -80,9 +80,9 @@ class Appointments extends EA_Controller {
}
/**
* Create a appointment.
* Store a new appointment.
*/
public function create()
public function store()
{
try
{

View file

@ -166,9 +166,9 @@ class Customers extends EA_Controller {
}
/**
* Create a customer.
* Store a new customer.
*/
public function create()
public function store()
{
try
{

View file

@ -123,9 +123,9 @@ class Providers extends EA_Controller {
}
/**
* Create a provider.
* Store a new provider.
*/
public function create()
public function store()
{
try
{

View file

@ -123,9 +123,9 @@ class Secretaries extends EA_Controller {
}
/**
* Create a secretary.
* Store a new secretary.
*/
public function create()
public function store()
{
try
{

View file

@ -107,9 +107,9 @@ class Service_categories extends EA_Controller {
}
/**
* Create a service-category.
* Store a new service-category.
*/
public function create()
public function store()
{
try
{

View file

@ -108,9 +108,9 @@ class Services extends EA_Controller {
}
/**
* Create a service.
* Store a new service.
*/
public function create()
public function store()
{
try
{

View file

@ -65,9 +65,9 @@ class Unavailabilities extends EA_Controller {
}
/**
* Create a unavailability.
* Store a new unavailability.
*/
public function create()
public function store()
{
try
{

View file

@ -124,9 +124,9 @@ class Webhooks extends EA_Controller {
}
/**
* Create a webhook.
* Store a new webhook.
*/
public function create()
public function store()
{
try
{

View file

@ -122,7 +122,7 @@ class Admins_api_v1 extends EA_Controller {
}
/**
* Create an admin.
* Store a new admin.
*/
public function store()
{

View file

@ -186,7 +186,7 @@ class Appointments_api_v1 extends EA_Controller {
}
/**
* Create an appointment.
* Store a new appointment.
*/
public function store()
{

View file

@ -113,7 +113,7 @@ class Customers_api_v1 extends EA_Controller {
}
/**
* Create a customer.
* Store a new customer.
*/
public function store()
{

View file

@ -120,7 +120,7 @@ class Providers_api_v1 extends EA_Controller {
}
/**
* Create a provider.
* Store a new provider.
*/
public function store()
{

View file

@ -113,7 +113,7 @@ class Secretaries_api_v1 extends EA_Controller {
}
/**
* Create a secretary.
* Store a new secretary.
*/
public function store()
{

View file

@ -120,7 +120,7 @@ class Service_categories_api_v1 extends EA_Controller {
}
/**
* Create a service-category.
* Store a new service-category.
*/
public function store()
{

View file

@ -120,7 +120,7 @@ class Services_api_v1 extends EA_Controller {
}
/**
* Create an service.
* Store a new service.
*/
public function store()
{

View file

@ -118,7 +118,7 @@ class Unavailabilities_api_v1 extends EA_Controller {
}
/**
* Create an unavailability.
* Store a new unavailability.
*/
public function store()
{

View file

@ -120,7 +120,7 @@ class Webhooks_api_v1 extends EA_Controller {
}
/**
* Create a webhook.
* Store a new webhook.
*/
public function store()
{

View file

@ -23,7 +23,7 @@ App.Http.Admins = (function () {
* @return {Object}
*/
function save(admin) {
return admin.id ? update(admin) : create(admin);
return admin.id ? update(admin) : store(admin);
}
/**
@ -33,8 +33,8 @@ App.Http.Admins = (function () {
*
* @return {Object}
*/
function create(admin) {
const url = App.Utils.Url.siteUrl('admins/create');
function store(admin) {
const url = App.Utils.Url.siteUrl('admins/store');
const data = {
csrf_token: vars('csrf_token'),
@ -124,7 +124,7 @@ App.Http.Admins = (function () {
return {
save,
create,
store,
update,
destroy,
search,

View file

@ -23,7 +23,7 @@ App.Http.Appointments = (function () {
* @return {Object}
*/
function save(appointment) {
return appointment.id ? update(appointment) : create(appointment);
return appointment.id ? update(appointment) : store(appointment);
}
/**
@ -33,8 +33,8 @@ App.Http.Appointments = (function () {
*
* @return {Object}
*/
function create(appointment) {
const url = App.Utils.Url.siteUrl('appointments/create');
function store(appointment) {
const url = App.Utils.Url.siteUrl('appointments/store');
const data = {
csrf_token: vars('csrf_token'),
@ -124,7 +124,7 @@ App.Http.Appointments = (function () {
return {
save,
create,
store,
update,
destroy,
search,

View file

@ -23,7 +23,7 @@ App.Http.Customers = (function () {
* @return {Object}
*/
function save(customer) {
return customer.id ? update(customer) : create(customer);
return customer.id ? update(customer) : store(customer);
}
/**
@ -33,8 +33,8 @@ App.Http.Customers = (function () {
*
* @return {Object}
*/
function create(customer) {
const url = App.Utils.Url.siteUrl('customers/create');
function store(customer) {
const url = App.Utils.Url.siteUrl('customers/store');
const data = {
csrf_token: vars('csrf_token'),
@ -124,7 +124,7 @@ App.Http.Customers = (function () {
return {
save,
create,
store,
update,
destroy,
search,

View file

@ -23,7 +23,7 @@ App.Http.Providers = (function () {
* @return {Object}
*/
function save(provider) {
return provider.id ? update(provider) : create(provider);
return provider.id ? update(provider) : store(provider);
}
/**
@ -33,8 +33,8 @@ App.Http.Providers = (function () {
*
* @return {Object}
*/
function create(provider) {
const url = App.Utils.Url.siteUrl('providers/create');
function store(provider) {
const url = App.Utils.Url.siteUrl('providers/store');
const data = {
csrf_token: vars('csrf_token'),
@ -124,7 +124,7 @@ App.Http.Providers = (function () {
return {
save,
create,
store,
update,
destroy,
search,

View file

@ -23,7 +23,7 @@ App.Http.Secretaries = (function () {
* @return {Object}
*/
function save(secretary) {
return secretary.id ? update(secretary) : create(secretary);
return secretary.id ? update(secretary) : store(secretary);
}
/**
@ -33,8 +33,8 @@ App.Http.Secretaries = (function () {
*
* @return {Object}
*/
function create(secretary) {
const url = App.Utils.Url.siteUrl('secretaries/create');
function store(secretary) {
const url = App.Utils.Url.siteUrl('secretaries/store');
const data = {
csrf_token: vars('csrf_token'),
@ -124,7 +124,7 @@ App.Http.Secretaries = (function () {
return {
save,
create,
store,
update,
destroy,
search,

View file

@ -23,7 +23,7 @@ App.Http.ServiceCategories = (function () {
* @return {Object}
*/
function save(serviceCategory) {
return serviceCategory.id ? update(serviceCategory) : create(serviceCategory);
return serviceCategory.id ? update(serviceCategory) : store(serviceCategory);
}
/**
@ -33,8 +33,8 @@ App.Http.ServiceCategories = (function () {
*
* @return {Object}
*/
function create(serviceCategory) {
const url = App.Utils.Url.siteUrl('service_categories/create');
function store(serviceCategory) {
const url = App.Utils.Url.siteUrl('service_categories/store');
const data = {
csrf_token: vars('csrf_token'),
@ -124,7 +124,7 @@ App.Http.ServiceCategories = (function () {
return {
save,
create,
store,
update,
destroy,
search,

View file

@ -23,7 +23,7 @@ App.Http.Services = (function () {
* @return {Object}
*/
function save(service) {
return service.id ? update(service) : create(service);
return service.id ? update(service) : store(service);
}
/**
@ -33,8 +33,8 @@ App.Http.Services = (function () {
*
* @return {Object}
*/
function create(service) {
const url = App.Utils.Url.siteUrl('services/create');
function store(service) {
const url = App.Utils.Url.siteUrl('services/store');
const data = {
csrf_token: vars('csrf_token'),
@ -124,7 +124,7 @@ App.Http.Services = (function () {
return {
save,
create,
store,
update,
destroy,
search,

View file

@ -23,7 +23,7 @@ App.Http.Unavailabilities = (function () {
* @return {Object}
*/
function save(unavailability) {
return unavailability.id ? update(unavailability) : create(unavailability);
return unavailability.id ? update(unavailability) : store(unavailability);
}
/**
@ -33,8 +33,8 @@ App.Http.Unavailabilities = (function () {
*
* @return {Object}
*/
function create(unavailability) {
const url = App.Utils.Url.siteUrl('unavailabilities/create');
function store(unavailability) {
const url = App.Utils.Url.siteUrl('unavailabilities/store');
const data = {
csrf_token: vars('csrf_token'),
@ -124,7 +124,7 @@ App.Http.Unavailabilities = (function () {
return {
save,
create,
store,
update,
destroy,
search,

View file

@ -23,7 +23,7 @@ App.Http.Webhooks = (function () {
* @return {Object}
*/
function save(webhook) {
return webhook.id ? update(webhook) : create(webhook);
return webhook.id ? update(webhook) : store(webhook);
}
/**
@ -33,8 +33,8 @@ App.Http.Webhooks = (function () {
*
* @return {Object}
*/
function create(webhook) {
const url = App.Utils.Url.siteUrl('webhooks/create');
function store(webhook) {
const url = App.Utils.Url.siteUrl('webhooks/store');
const data = {
csrf_token: vars('csrf_token'),
@ -124,7 +124,7 @@ App.Http.Webhooks = (function () {
return {
save,
create,
store,
update,
destroy,
search,