|
|
@@ -585,36 +585,16 @@ export class SitesEndpoint extends BaseEndpointComponent {
|
|
|
const scheduledJobs = this.db.getScheduledJobs(site.id);
|
|
|
|
|
|
// Build response with content change markers and URLs only (no content)
|
|
|
- const contentMetadata: any = {
|
|
|
- shipping_informations: latestContent.shipping.map(c => ({
|
|
|
+ const contentMetadata: any = {};
|
|
|
+ for (const [category, items] of Object.entries(latestContent)) {
|
|
|
+ contentMetadata[category] = (items as any[]).map(c => ({
|
|
|
id: c.id,
|
|
|
url: c.url,
|
|
|
changed: Boolean(c.changed),
|
|
|
enabled: Boolean(c.enabled),
|
|
|
last_updated: c.updated_at
|
|
|
- })),
|
|
|
- contacts: latestContent.contacts.map(c => ({
|
|
|
- id: c.id,
|
|
|
- url: c.url,
|
|
|
- changed: Boolean(c.changed),
|
|
|
- enabled: Boolean(c.enabled),
|
|
|
- last_updated: c.updated_at
|
|
|
- })),
|
|
|
- terms_of_conditions: latestContent.terms.map(c => ({
|
|
|
- id: c.id,
|
|
|
- url: c.url,
|
|
|
- changed: Boolean(c.changed),
|
|
|
- enabled: Boolean(c.enabled),
|
|
|
- last_updated: c.updated_at
|
|
|
- })),
|
|
|
- faq: latestContent.faq.map(c => ({
|
|
|
- id: c.id,
|
|
|
- url: c.url,
|
|
|
- changed: Boolean(c.changed),
|
|
|
- enabled: Boolean(c.enabled),
|
|
|
- last_updated: c.updated_at
|
|
|
- }))
|
|
|
- };
|
|
|
+ }));
|
|
|
+ }
|
|
|
|
|
|
res.json({
|
|
|
site: {
|