From 8fbde18d02134f4cc1f2e2528125e30d592ef709 Mon Sep 17 00:00:00 2001 From: echo Date: Sat, 28 Feb 2026 16:33:27 +0100 Subject: [PATCH] feat: add GET endpoint for sync/all for easier testing --- backend/src/modules/strapi.controller.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/src/modules/strapi.controller.ts b/backend/src/modules/strapi.controller.ts index a0a71fc..e37a2d9 100644 --- a/backend/src/modules/strapi.controller.ts +++ b/backend/src/modules/strapi.controller.ts @@ -1,4 +1,4 @@ -import { Controller, Post, Body, Logger } from '@nestjs/common'; +import { Controller, Post, Get, Body, Logger } from '@nestjs/common'; import { StrapiService } from './strapi.service'; import { Public } from './auth/public.decorator'; @@ -120,11 +120,19 @@ export class StrapiController { } @Post('sync/all') + @Public() async syncAllArticles() { await this.strapiService.syncArticles(); return { message: 'Articles sync completed' }; } + @Get('sync/all') + @Public() + async syncAllArticlesGet() { + await this.strapiService.syncArticles(); + return { message: 'Articles sync completed' }; + } + @Post('sync/live-blogs') async syncAllLiveBlogs() { await this.strapiService.syncLiveBlogs();