// parseListServicesHandlerParameters parses page and search query parameters for GET /services

parseListServicesHandlerParameters parses page and search query parameters for GET /services
// parseListServicesHandlerParameters parses page and search query parameters for GET / services
func parseListServicesHandlerParameters(c *routing.Context) (string, int, error) {
	page := 1
	var err error
	searchQuery := ""
	if c.QueryArgs().Has("page") {
		page, err = strconv.Atoi(string(c.QueryArgs().Peek("page")))
		if err != nil {
			return "", page, errors.New("Invalid page")
		}
	}
	if c.QueryArgs().Has("q") {
		searchQuery = string(c.QueryArgs().Peek("q"))
	}
	return searchQuery, page, nil
}
func parseListServicesHandlerParameters ( c * routing . Context ) ( string , int , error ) { page := 1 var err error searchQuery := " " if c . QueryArgs ( ) . Has ( " " ) { page , err = strconv . Atoi ( string ( c . QueryArgs ( ) . Peek ( " " ) ) ) if err != nil { return " " , page , errors . New ( " " ) } } if c . QueryArgs ( ) . Has ( " " ) { searchQuery = string ( c . QueryArgs ( ) . Peek ( " " ) ) } return searchQuery , page , nil }
parseListServicesHandlerParameters parses page and search query parameters for GET /services
parseListServicesHandlerParameters parses page and search query parameters for GET / services