delete/archive implemented
This commit is contained in:
1 parent
89b8687431
commit
9ca05f5ea1
13 files changed
+680
-163
No files matched your search
@@ -4,6 +4,7 @@ import {
|
||||
Post,
|
||||
Put,
|
||||
Delete,
|
||||
Patch,
|
||||
Body,
|
||||
Param,
|
||||
Query,
|
||||
@@ -21,6 +22,7 @@ import {
|
||||
CreateLiveBlogUpdateDto,
|
||||
UpdateLiveBlogUpdateDto,
|
||||
} from './articles.dto';
|
||||
import { LiveBlogStatus } from './entities';
|
||||
|
||||
@Controller('live-blogs')
|
||||
export class LiveBlogController {
|
||||
@@ -121,6 +123,19 @@ export class LiveBlogController {
|
||||
return this.liveBlogService.removeUpdate(liveBlogId, updateId);
|
||||
}
|
||||
|
||||
@Patch(':id/archive')
|
||||
archive(@Param('id') id: string) {
|
||||
return this.liveBlogService.archive(id);
|
||||
}
|
||||
|
||||
@Patch(':id/publish')
|
||||
publish(
|
||||
@Param('id') id: string,
|
||||
@Query('status') status?: LiveBlogStatus,
|
||||
) {
|
||||
return this.liveBlogService.publish(id, status || LiveBlogStatus.DRAFT);
|
||||
}
|
||||
|
||||
// SSE endpoint for real-time updates
|
||||
@Get(':id/stream')
|
||||
stream(
|
||||
|
||||
Reference in new issue
Block a user