aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/miscs/sql.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/miscs/sql.ts')
-rw-r--r--shared/extra-utils/miscs/sql.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/shared/extra-utils/miscs/sql.ts b/shared/extra-utils/miscs/sql.ts
index dfe840d8c..167649c6d 100644
--- a/shared/extra-utils/miscs/sql.ts
+++ b/shared/extra-utils/miscs/sql.ts
@@ -80,11 +80,20 @@ function setPluginVersion (internalServerNumber: number, pluginName: string, new
80 return seq.query(`UPDATE "plugin" SET "version" = '${newVersion}' WHERE "name" = '${pluginName}'`, options) 80 return seq.query(`UPDATE "plugin" SET "version" = '${newVersion}' WHERE "name" = '${pluginName}'`, options)
81} 81}
82 82
83function setActorFollowScores (internalServerNumber: number, newScore: number) {
84 const seq = getSequelize(internalServerNumber)
85
86 const options = { type: QueryTypes.UPDATE }
87
88 return seq.query(`UPDATE "actorFollow" SET "score" = ${newScore}`, options)
89}
90
83export { 91export {
84 setVideoField, 92 setVideoField,
85 setPlaylistField, 93 setPlaylistField,
86 setActorField, 94 setActorField,
87 countVideoViewsOf, 95 countVideoViewsOf,
88 setPluginVersion, 96 setPluginVersion,
97 setActorFollowScores,
89 closeAllSequelize 98 closeAllSequelize
90} 99}