fix: incorrect condition for filter the tags
This commit is contained in:
parent
e5534cda24
commit
01e076d745
@ -19,7 +19,7 @@ export async function insertVideoInfo(client: Client, aid: number) {
|
|||||||
const desc = data.View.desc;
|
const desc = data.View.desc;
|
||||||
const uid = data.View.owner.mid;
|
const uid = data.View.owner.mid;
|
||||||
const tags = data.Tags
|
const tags = data.Tags
|
||||||
.filter((tag) => !["old_channel", "topic"].indexOf(tag.tag_type))
|
.filter((tag) => ["old_channel", "topic"].includes(tag.tag_type))
|
||||||
.map((tag) => tag.tag_name).join(",");
|
.map((tag) => tag.tag_name).join(",");
|
||||||
const title = data.View.title;
|
const title = data.View.title;
|
||||||
const published_at = formatTimestampToPsql(data.View.pubdate * SECOND + 8 * HOUR);
|
const published_at = formatTimestampToPsql(data.View.pubdate * SECOND + 8 * HOUR);
|
||||||
|
Loading…
Reference in New Issue
Block a user