Skip to content

Commit

Permalink
correct bug date updatedAt and sync.currentUpdated
Browse files Browse the repository at this point in the history
  • Loading branch information
fufeck committed Aug 26, 2024
1 parent 64c2808 commit 445f92f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions libs/shared/src/modules/publication/publication.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,21 @@ export class PublicationService {
baseLocale: BaseLocale,
lastUploadedRevisionId: string,
) {
const now = new Date();
const sync: BaseLocaleSync = {
status: StatusSyncEnum.SYNCED,
isPaused: false,
currentUpdated: baseLocale.updatedAt,
currentUpdated: now,
lastUploadedRevisionId,
};

await this.basesLocalesRepository.update(
{ id: baseLocale.id },
{ status: StatusBaseLocalEnum.PUBLISHED, sync },
{
status: StatusBaseLocalEnum.PUBLISHED,
sync,
updatedAt: () => `'${now.toISOString()}'`,
},
);

return this.basesLocalesRepository.findOneBy({ id: baseLocale.id });
Expand Down

0 comments on commit 445f92f

Please sign in to comment.