aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/miscs/sql.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/miscs/sql.ts')
-rw-r--r--server/tests/utils/miscs/sql.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/tests/utils/miscs/sql.ts b/server/tests/utils/miscs/sql.ts
index 204ff5163..027f78131 100644
--- a/server/tests/utils/miscs/sql.ts
+++ b/server/tests/utils/miscs/sql.ts
@@ -24,6 +24,15 @@ function setActorField (serverNumber: number, to: string, field: string, value:
24 return seq.query(`UPDATE actor SET "${field}" = '${value}' WHERE url = '${to}'`, options) 24 return seq.query(`UPDATE actor SET "${field}" = '${value}' WHERE url = '${to}'`, options)
25} 25}
26 26
27function setVideoField (serverNumber: number, uuid: string, field: string, value: string) {
28 const seq = getSequelize(serverNumber)
29
30 const options = { type: Sequelize.QueryTypes.UPDATE }
31
32 return seq.query(`UPDATE video SET "${field}" = '${value}' WHERE uuid = '${uuid}'`, options)
33}
34
27export { 35export {
36 setVideoField,
28 setActorField 37 setActorField
29} 38}