remove extra properties

This commit is contained in:
Michael C
2021-06-16 00:53:34 -04:00
parent 8dcc1a4a53
commit 7fe787c5ab

View File

@@ -6,7 +6,11 @@ const isValidSegmentUUID = (str: string): Boolean => /^([a-f0-9]{64}|[a-f0-9]{8}
async function getSegmentFromDBByUUID(UUID: SegmentUUID): Promise<DBSegment> {
try {
return await db.prepare('get', `SELECT * FROM "sponsorTimes" WHERE "UUID" = ?`, [UUID])
return await db.prepare('get',
`SELECT "videoID", "startTime", "endTime", "votes", "locked",
"UUID", "userID", "timeSubmitted", "views", "category",
"service", "videoDuration", "hidden", "reputation", "shadowHidden" FROM "sponsorTimes"
WHERE "UUID" = ?`, [UUID])
} catch (err) {
return null
}