Skip to content

Commit

Permalink
fix: publishedAt on create (bloom-housing#4479)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinBuyck committed Nov 19, 2024
1 parent 740fe3a commit b00dd4f
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 @@ -895,6 +895,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 b00dd4f

Please sign in to comment.