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();