Make /searchSegments return the segment description

This commit is contained in:
mini-bomba 2022-10-01 13:46:27 +02:00
parent 847f1bbabb
commit eb5458427d
No known key found for this signature in database
GPG key ID: 30F8B138B4794886
2 changed files with 3 additions and 2 deletions

View file

@ -14,7 +14,7 @@ type searchSegmentResponse = {
function getSegmentsFromDBByVideoID(videoID: VideoID, service: Service): Promise<DBSegment[]> {
return db.prepare(
"all",
`SELECT "UUID", "timeSubmitted", "startTime", "endTime", "category", "actionType", "votes", "views", "locked", "hidden", "shadowHidden", "userID" FROM "sponsorTimes"
`SELECT "UUID", "timeSubmitted", "startTime", "endTime", "category", "actionType", "votes", "views", "locked", "hidden", "shadowHidden", "userID", "description" FROM "sponsorTimes"
WHERE "videoID" = ? AND "service" = ? ORDER BY "timeSubmitted"`,
[videoID, service]
) as Promise<DBSegment[]>;

View file

@ -274,7 +274,8 @@ describe("getSearchSegments", () => {
locked: 1,
hidden: 0,
shadowHidden: 0,
userID: "searchTestUser"
userID: "searchTestUser",
description: ""
};
assert.deepStrictEqual(segment0, expected);
done();