mirror of
https://github.com/sussy-code/backend.git
synced 2026-04-21 08:51:57 +00:00
Revert "Use date to compare progress items"
This reverts commit cf0125755c.
This commit is contained in:
parent
cf0125755c
commit
05bf651939
1 changed files with 4 additions and 3 deletions
|
|
@ -100,9 +100,10 @@ export const userProgressRouter = makeRouter((app) => {
|
||||||
|
|
||||||
if (newItemIndex > -1) {
|
if (newItemIndex > -1) {
|
||||||
const newItem = newItems[newItemIndex];
|
const newItem = newItems[newItemIndex];
|
||||||
const newItemDate = defaultAndCoerceDateTime(newItem.updatedAt);
|
if (existingItem.watched < newItem.watched) {
|
||||||
if (existingItem.updatedAt.getTime() < newItemDate.getTime()) {
|
existingItem.updatedAt = defaultAndCoerceDateTime(
|
||||||
existingItem.updatedAt = newItemDate;
|
newItem.updatedAt,
|
||||||
|
);
|
||||||
existingItem.watched = newItem.watched;
|
existingItem.watched = newItem.watched;
|
||||||
}
|
}
|
||||||
itemsUpserted.push(existingItem);
|
itemsUpserted.push(existingItem);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue