[yoga-4] add dynamic service page

This commit is contained in:
Roland Schneider
2025-05-20 16:55:25 +02:00
parent 2d4487263d
commit 2c71984d96
4 changed files with 43 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ import {ServicesPage_Plain} from "@/types/generated-strapi-interfaces/api/servic
import {PricesPage_Plain} from "@/types/generated-strapi-interfaces/api/prices-page";
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";
class StrapiApi{
@@ -42,6 +43,16 @@ class StrapiApi{
return this.getJson("/api/services-page?",servicesQuery);
}
public getServicePage(name: string): Promise<YogaSingleService_Plain[]>{
return this.getJson("/api/yoga-single-services?", {
filters: {
name: {
$eq: name,
},
},
});
}
public getPricesPage(): Promise<PricesPage_Plain>{
return this.getJson("/api/prices-page?",pricesQuery);
}