feat(posts): ✨ Add verification methods to PostsService and update MyVerificationsPage for post status display
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
5201ac96f6
commit
790a687890
2 changed files with 6 additions and 7 deletions
|
|
@ -161,14 +161,14 @@ export class PostsService {
|
|||
|
||||
const saved = await this.postsRepository.save(post);
|
||||
|
||||
await this.domainEvents.emitContentCreated({
|
||||
await this.domainEvents.emit('content:created', {
|
||||
contentId: saved.id,
|
||||
title: saved.title,
|
||||
slug: saved.slug,
|
||||
content: saved.content,
|
||||
contentType: saved.contentType,
|
||||
domain: saved.domain,
|
||||
});
|
||||
}, saved.id);
|
||||
|
||||
return saved;
|
||||
}
|
||||
|
|
@ -193,7 +193,7 @@ export class PostsService {
|
|||
relations: ['author', 'category', 'series'],
|
||||
}) as PostEntity;
|
||||
|
||||
await this.domainEvents.emitContentUpdated({
|
||||
await this.domainEvents.emit('content:updated', {
|
||||
contentId: result.id,
|
||||
title: result.title,
|
||||
slug: result.slug,
|
||||
|
|
@ -203,7 +203,7 @@ export class PostsService {
|
|||
author: result.author?.name ?? undefined,
|
||||
tags: result.tags,
|
||||
metadata: result.metadata,
|
||||
});
|
||||
}, result.id);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -233,7 +233,7 @@ export class PostsService {
|
|||
relations: ['author', 'category', 'series'],
|
||||
}) as PostEntity;
|
||||
|
||||
await this.domainEvents.emitContentPublished({
|
||||
await this.domainEvents.emit('content:published', {
|
||||
contentId: result.id,
|
||||
title: result.title,
|
||||
slug: result.slug,
|
||||
|
|
@ -244,7 +244,7 @@ export class PostsService {
|
|||
tags: result.tags,
|
||||
publishedAt: (result.publishedAt ?? new Date()).toISOString(),
|
||||
metadata: result.metadata,
|
||||
});
|
||||
}, result.id);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,6 @@ export function MyVerificationsPage() {
|
|||
hasTimestampProof={v.hasTimestampProof}
|
||||
hasPhotoProof={v.hasPhotoProof}
|
||||
hasBookingLink={v.hasBookingLink}
|
||||
badge={v.badge}
|
||||
/>
|
||||
|
||||
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue