feat: add GET endpoint for sync/all for easier testing
This commit is contained in:
parent
94b0239a0a
commit
8fbde18d02
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user