fix: incorrect condition for filter the tags

This commit is contained in:
alikia2x (寒寒) 2025-03-23 13:44:03 +08:00
parent e5534cda24
commit 01e076d745
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6

View File

@ -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);