Skip to content

Commit

Permalink
fix: publishedAt on create (#4479)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinBuyck authored Nov 19, 2024
1 parent 2edb70f commit 6525eb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/services/listing.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,8 @@ export class ListingService implements OnModuleInit {
}
: undefined,
requestedChangesUser: undefined,
publishedAt:
dto.status === ListingsStatusEnum.active ? new Date() : undefined,
contentUpdatedAt: new Date(),
copyOf: copyOfId
? {
Expand Down
1 change: 1 addition & 0 deletions api/test/unit/services/listing.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1895,6 +1895,7 @@ describe('Testing listing service', () => {
data: {
...val,
contentUpdatedAt: expect.anything(),
publishedAt: expect.anything(),
assets: {
create: [exampleAsset],
},
Expand Down

0 comments on commit 6525eb6

Please sign in to comment.