mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
Make /searchSegments return the segment description
This commit is contained in:
parent
847f1bbabb
commit
eb5458427d
2 changed files with 3 additions and 2 deletions
|
@ -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[]>;
|
||||
|
|
|
@ -274,7 +274,8 @@ describe("getSearchSegments", () => {
|
|||
locked: 1,
|
||||
hidden: 0,
|
||||
shadowHidden: 0,
|
||||
userID: "searchTestUser"
|
||||
userID: "searchTestUser",
|
||||
description: ""
|
||||
};
|
||||
assert.deepStrictEqual(segment0, expected);
|
||||
done();
|
||||
|
|
Loading…
Reference in a new issue