1 Commits

Author SHA1 Message Date
Schneider Roland
56dda3233a [yoga-4] add new field: article 2025-05-20 07:46:17 +02:00
5 changed files with 10 additions and 53 deletions

View File

@@ -22,8 +22,3 @@ x
GET {{domain}}/api/yoga-blog-posts/wmhqy1n8japcfpy0of4hauwm
Accept: application/json
#Authorization: Bearer {{token}}
### GET request with a header
GET {{domain}}/api/yoga-single-services?filters[name][$eq]=service4
Accept: application/json

View File

@@ -13,7 +13,6 @@ 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{
@@ -43,16 +42,6 @@ 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);
}

View File

@@ -1,27 +1,6 @@
import React from "react";
import strapiApi from "@/api/strapi/strapi-api";
export default async function ServiceArticlePage({params}: {
params: { slug: string}
} ) {
const servicesByName = await strapiApi.getServicePage(params.slug);
// return (
// <>
// {header && description && <SubHeaderComponent header1={header} description={description} />}
// { ourServices && <OurServicesComponent config={ourServices} /> }
// { contactUs && <ContactUsComponent contactUs={contactUs} />}
// { ourSpecialities && <OurSpecialitiesComponent config={ourSpecialities} /> }
// { feedbacks && <FeedbackComponent config={feedbacks} /> }
// { blogs && <BlogPostsComponent config={blogs} /> }
// { subscribe && <SubscribeComponent config={subscribe} /> }
// { footer && <FooterComponent config={footer} /> }
// <AosComponent />
// </>
// );
console.info("slug", params.slug);
console.info("servicesByName", servicesByName);
return (
<div>hello world {params.slug}</div>
);
}
export const dynamic = 'force-dynamic'
export default async function ServiceDetails() {
return (
<h1>hello </h1>
)
}

View File

@@ -73,11 +73,6 @@
"type": "string"
},
"article": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "richtext"
}
}

View File

@@ -34,6 +34,10 @@ export interface AdminApiToken extends Struct.CollectionTypeSchema {
minLength: 1;
}> &
Schema.Attribute.DefaultTo<''>;
encryptedKey: Schema.Attribute.Text &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
expiresAt: Schema.Attribute.DateTime;
lastUsedAt: Schema.Attribute.DateTime;
lifespan: Schema.Attribute.BigInteger;
@@ -1687,12 +1691,7 @@ export interface ApiYogaSingleServiceYogaSingleService
};
};
attributes: {
article: Schema.Attribute.RichText &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
article: Schema.Attribute.RichText;
buttonLink: Schema.Attribute.String &
Schema.Attribute.SetPluginOptions<{
i18n: {