mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-31 14:33:50 -04:00
Fix progress date format
This commit is contained in:
parent
7b3f3cc1c1
commit
4c1ad4da5b
@ -146,7 +146,7 @@ export const mapProgress = ({ aliased }: { aliased: boolean }) => {
|
||||
const ret = {
|
||||
time: coalesce(time, sql<number>`0`),
|
||||
percent: coalesce(percent, sql<number>`0`),
|
||||
playedDate: sql<string>`${playedDate}`,
|
||||
playedDate: sql`to_char(${playedDate}, 'YYYY-MM-DD"T"HH24:MI:SS"Z"')`,
|
||||
videoId: sql<string>`${videoId}`,
|
||||
};
|
||||
if (!aliased) return ret;
|
||||
|
@ -36,7 +36,7 @@ describe("Set & get watch status", () => {
|
||||
expect(body.items[0].slug).toBe(bubble.slug);
|
||||
expect(body.items[0].watchStatus).toMatchObject({
|
||||
status: "completed",
|
||||
completedAt: "2024-12-21 00:00:00+00",
|
||||
completedAt: "2024-12-21T00:00:00Z",
|
||||
score: 85,
|
||||
percent: 100,
|
||||
});
|
||||
@ -61,7 +61,7 @@ describe("Set & get watch status", () => {
|
||||
expect(body.items[0].slug).toBe(bubble.slug);
|
||||
expect(body.items[0].watchStatus).toMatchObject({
|
||||
status: "rewatching",
|
||||
completedAt: "2024-12-21 00:00:00+00",
|
||||
completedAt: "2024-12-21T00:00:00Z",
|
||||
score: 85,
|
||||
percent: 0,
|
||||
});
|
||||
@ -89,7 +89,7 @@ describe("Set & get watch status", () => {
|
||||
expect(body.items[0].slug).toBe(bubble.slug);
|
||||
expect(body.items[0].watchStatus).toMatchObject({
|
||||
status: "rewatching",
|
||||
completedAt: "2024-12-21 00:00:00+00",
|
||||
completedAt: "2024-12-21T00:00:00Z",
|
||||
score: 85,
|
||||
percent: 0,
|
||||
});
|
||||
@ -109,7 +109,7 @@ describe("Set & get watch status", () => {
|
||||
expect(body.slug).toBe(bubble.slug);
|
||||
expect(body.watchStatus).toMatchObject({
|
||||
status: "rewatching",
|
||||
completedAt: "2024-12-21 00:00:00+00",
|
||||
completedAt: "2024-12-21T00:00:00Z",
|
||||
score: 85,
|
||||
percent: 0,
|
||||
});
|
||||
|
@ -109,7 +109,7 @@ describe("Set & get history", () => {
|
||||
percent: 100,
|
||||
time: 38 * 60,
|
||||
videoId: madeInAbyssVideo.id,
|
||||
playedDate: "2025-02-03 00:00:00+00",
|
||||
playedDate: "2025-02-03T00:00:00Z",
|
||||
});
|
||||
});
|
||||
|
||||
@ -122,7 +122,7 @@ describe("Set & get history", () => {
|
||||
percent: 100,
|
||||
time: 38 * 60,
|
||||
videoId: madeInAbyssVideo.id,
|
||||
playedDate: "2025-02-03 00:00:00+00",
|
||||
playedDate: "2025-02-03T00:00:00Z",
|
||||
});
|
||||
});
|
||||
|
||||
@ -137,13 +137,13 @@ describe("Set & get history", () => {
|
||||
expect(body.items[0].watchStatus).toMatchObject({
|
||||
status: "watching",
|
||||
seenCount: 1,
|
||||
startedAt: "2025-02-01 00:00:00+00",
|
||||
startedAt: "2025-02-01T00:00:00Z",
|
||||
});
|
||||
expect(body.items[1].slug).toBe(bubble.slug);
|
||||
expect(body.items[1].watchStatus).toMatchObject({
|
||||
status: "completed",
|
||||
percent: 100,
|
||||
completedAt: "2025-02-02 00:00:00+00",
|
||||
completedAt: "2025-02-02T00:00:00Z",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -113,7 +113,7 @@ describe("nextup", () => {
|
||||
percent: 58,
|
||||
time: 28 * 60 + 12,
|
||||
videoId: madeInAbyssVideo.id,
|
||||
playedDate: "2025-02-01T00:00:00+00:00",
|
||||
playedDate: "2025-02-01T00:00:00Z",
|
||||
});
|
||||
|
||||
[resp, body] = await getMovie(bubble.slug, {});
|
||||
@ -121,7 +121,7 @@ describe("nextup", () => {
|
||||
expect(body.watchStatus).toMatchObject({
|
||||
percent: 100,
|
||||
status: "completed",
|
||||
completedAt: "2025-02-02 00:00:00+00",
|
||||
completedAt: "2025-02-02T00:00:00Z",
|
||||
});
|
||||
|
||||
[resp, body] = await getNextup("me", {});
|
||||
@ -132,7 +132,7 @@ describe("nextup", () => {
|
||||
percent: 58,
|
||||
time: 28 * 60 + 12,
|
||||
videoId: madeInAbyssVideo.id,
|
||||
playedDate: "2025-02-01 00:00:00+00",
|
||||
playedDate: "2025-02-01T00:00:00Z",
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user