diff options
Diffstat (limited to 'shared/utils/users')
-rw-r--r-- | shared/utils/users/accounts.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shared/utils/users/accounts.ts b/shared/utils/users/accounts.ts index 54d66ac2a..f64a2dbad 100644 --- a/shared/utils/users/accounts.ts +++ b/shared/utils/users/accounts.ts | |||
@@ -7,6 +7,7 @@ import { join } from 'path' | |||
7 | import { Account } from '../../models/actors' | 7 | import { Account } from '../../models/actors' |
8 | import { root } from '../miscs/miscs' | 8 | import { root } from '../miscs/miscs' |
9 | import { makeGetRequest } from '../requests/requests' | 9 | import { makeGetRequest } from '../requests/requests' |
10 | import { VideoRateType } from '../../models/videos' | ||
10 | 11 | ||
11 | function getAccountsList (url: string, sort = '-createdAt', statusCodeExpected = 200) { | 12 | function getAccountsList (url: string, sort = '-createdAt', statusCodeExpected = 200) { |
12 | const path = '/api/v1/accounts' | 13 | const path = '/api/v1/accounts' |
@@ -54,9 +55,11 @@ async function checkActorFilesWereRemoved (actorUUID: string, serverNumber: numb | |||
54 | } | 55 | } |
55 | } | 56 | } |
56 | 57 | ||
57 | function getAccountRatings (url: string, accountName: string, accessToken: string, statusCodeExpected = 200, query = {}) { | 58 | function getAccountRatings (url: string, accountName: string, accessToken: string, rating?: VideoRateType, statusCodeExpected = 200) { |
58 | const path = '/api/v1/accounts/' + accountName + '/ratings' | 59 | const path = '/api/v1/accounts/' + accountName + '/ratings' |
59 | 60 | ||
61 | const query = rating ? { rating } : {} | ||
62 | |||
60 | return request(url) | 63 | return request(url) |
61 | .get(path) | 64 | .get(path) |
62 | .query(query) | 65 | .query(query) |