mirror of
https://github.com/p-stream/backend.git
synced 2026-03-11 17:55:35 +00:00
Update watch-history.ts
This commit is contained in:
parent
77434c0598
commit
c8079ff2c8
1 changed files with 4 additions and 6 deletions
|
|
@ -57,22 +57,20 @@ export default defineEventHandler(async event => {
|
||||||
});
|
});
|
||||||
|
|
||||||
return items.map(item => ({
|
return items.map(item => ({
|
||||||
id: item.id,
|
|
||||||
tmdbId: item.tmdb_id,
|
tmdbId: item.tmdb_id,
|
||||||
episode: {
|
episode: {
|
||||||
id: item.episode_id || null,
|
id: item.episode_id || undefined,
|
||||||
number: item.episode_number || null,
|
number: item.episode_number || undefined,
|
||||||
},
|
},
|
||||||
season: {
|
season: {
|
||||||
id: item.season_id || null,
|
id: item.season_id || undefined,
|
||||||
number: item.season_number || null,
|
number: item.season_number || undefined,
|
||||||
},
|
},
|
||||||
meta: item.meta,
|
meta: item.meta,
|
||||||
duration: item.duration.toString(),
|
duration: item.duration.toString(),
|
||||||
watched: item.watched.toString(),
|
watched: item.watched.toString(),
|
||||||
watchedAt: item.watched_at.toISOString(),
|
watchedAt: item.watched_at.toISOString(),
|
||||||
completed: item.completed,
|
completed: item.completed,
|
||||||
updatedAt: item.updated_at.toISOString(),
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue