The search method parameters are optional

This commit is contained in:
Alex Tselegidis 2022-06-21 13:02:10 +03:00
parent 0576e69ad5
commit 71e12a1aae
9 changed files with 36 additions and 36 deletions

View file

@ -84,13 +84,13 @@ App.Http.Admins = (function () {
* Search admins by keyword.
*
* @param {String} keyword
* @param {Number} limit
* @param {Number} offset
* @param {String} orderBy
* @param {Number} [limit]
* @param {Number} [offset]
* @param {String} [orderBy]
*
* @return {Object}
*/
function search(keyword, limit, offset, orderBy) {
function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('admins/search');
const data = {

View file

@ -84,13 +84,13 @@ App.Http.Appointments = (function () {
* Search appointments by keyword.
*
* @param {String} keyword
* @param {Number} limit
* @param {Number} offset
* @param {String} orderBy
* @param {Number} [limit]
* @param {Number} [offset]
* @param {String} [orderBy]
*
* @return {Object}
*/
function search(keyword, limit, offset, orderBy) {
function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('appointments/search');
const data = {

View file

@ -84,13 +84,13 @@ App.Http.Categories = (function () {
* Search categories by keyword.
*
* @param {String} keyword
* @param {Number} limit
* @param {Number} offset
* @param {String} orderBy
* @param {Number} [limit]
* @param {Number} [offset]
* @param {String} [orderBy]
*
* @return {Object}
*/
function search(keyword, limit, offset, orderBy) {
function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('categories/search');
const data = {

View file

@ -84,13 +84,13 @@ App.Http.Providers = (function () {
* Search providers by keyword.
*
* @param {String} keyword
* @param {Number} limit
* @param {Number} offset
* @param {String} orderBy
* @param {Number} [limit]
* @param {Number} [offset]
* @param {String} [orderBy]
*
* @return {Object}
*/
function search(keyword, limit, offset, orderBy) {
function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('providers/search');
const data = {

View file

@ -84,13 +84,13 @@ App.Http.Secretaries = (function () {
* Search secretaries by keyword.
*
* @param {String} keyword
* @param {Number} limit
* @param {Number} offset
* @param {String} orderBy
* @param {Number} [limit]
* @param {Number} [offset]
* @param {String} [orderBy]
*
* @return {Object}
*/
function search(keyword, limit, offset, orderBy) {
function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('secretaries/search');
const data = {

View file

@ -84,13 +84,13 @@ App.Http.Services = (function () {
* Search services by keyword.
*
* @param {String} keyword
* @param {Number} limit
* @param {Number} offset
* @param {String} orderBy
* @param {Number} [limit]
* @param {Number} [offset]
* @param {String} [orderBy]
*
* @return {Object}
*/
function search(keyword, limit, offset, orderBy) {
function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('services/search');
const data = {

View file

@ -84,13 +84,13 @@ App.Http.Settings = (function () {
* Search settings by keyword.
*
* @param {String} keyword
* @param {Number} limit
* @param {Number} offset
* @param {String} orderBy
* @param {Number} [limit]
* @param {Number} [offset]
* @param {String} [orderBy]
*
* @return {Object}
*/
function search(keyword, limit, offset, orderBy) {
function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('settings/search');
const data = {

View file

@ -84,13 +84,13 @@ App.Http.Unavailabilities = (function () {
* Search unavailabilities by keyword.
*
* @param {String} keyword
* @param {Number} limit
* @param {Number} offset
* @param {String} orderBy
* @param {Number} [limit]
* @param {Number} [offset]
* @param {String} [orderBy]
*
* @return {Object}
*/
function search(keyword, limit, offset, orderBy) {
function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('unavailabilities/search');
const data = {

View file

@ -84,13 +84,13 @@ App.Http.Webhooks = (function () {
* Search webhooks by keyword.
*
* @param {String} keyword
* @param {Number} limit
* @param {Number} offset
* @param {String} orderBy
* @param {Number} [limit]
* @param {Number} [offset]
* @param {String} [orderBy]
*
* @return {Object}
*/
function search(keyword, limit, offset, orderBy) {
function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('webhooks/search');
const data = {