diff options
Diffstat (limited to 'server/tests/utils')
-rw-r--r-- | server/tests/utils/miscs/sql.ts | 9 |
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 | ||
27 | function 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 | |||
27 | export { | 35 | export { |
36 | setVideoField, | ||
28 | setActorField | 37 | setActorField |
29 | } | 38 | } |