add service detail page
This commit is contained in:
committed by
Roland Schneider
parent
4a0cf5762f
commit
22272e0a17
25
yoga-app/src/api/strapi/query/service.json
Normal file
25
yoga-app/src/api/strapi/query/service.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"subscribe": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"footer": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"links": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"contactUsEmail": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"contactUsLocation": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"contactUsPhoneNumber": {
|
||||
"fields": ["*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import qs from "qs";
|
||||
import aboutQuery from "@/api/strapi/query/about.json";
|
||||
import homeQuery from "@/api/strapi/query/home.json";
|
||||
import servicesQuery from "@/api/strapi/query/services.json";
|
||||
import serviceQuery from "@/api/strapi/query/service.json";
|
||||
import pricesQuery from "@/api/strapi/query/prices.json";
|
||||
import faqQuery from "@/api/strapi/query/faq.json";
|
||||
import contactQuery from "@/api/strapi/query/contact.json";
|
||||
@@ -14,6 +15,7 @@ import {PricesPage_Plain} from "@/types/generated-strapi-interfaces/api/prices-p
|
||||
import {FaqPage_Plain} from "@/types/generated-strapi-interfaces/api/faq-page";
|
||||
import {ContactPage_Plain} from "@/types/generated-strapi-interfaces/api/contact-page";
|
||||
import {YogaSingleService_Plain} from "@/types/generated-strapi-interfaces/api/yoga-single-service";
|
||||
import {ServicePage_Plain} from "@/types/generated-strapi-interfaces/api/service-page";
|
||||
|
||||
|
||||
class StrapiApi{
|
||||
@@ -43,7 +45,11 @@ class StrapiApi{
|
||||
return this.getJson("/api/services-page?",servicesQuery);
|
||||
}
|
||||
|
||||
public getServicePage(name: string): Promise<YogaSingleService_Plain[]>{
|
||||
public getServicePage(): Promise<ServicePage_Plain>{
|
||||
return this.getJson("/api/service-page?",serviceQuery);
|
||||
}
|
||||
|
||||
public getService(name: string): Promise<YogaSingleService_Plain[]>{
|
||||
return this.getJson("/api/yoga-single-services?", {
|
||||
filters: {
|
||||
name: {
|
||||
|
||||
Reference in New Issue
Block a user