+import { makeDeleteRequest, makeGetRequest } from '../requests/requests'
+import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
+
+function getAdminVideoComments (options: {
+ url: string
+ token: string
+ start: number
+ count: number
+ sort?: string
+ isLocal?: boolean
+ search?: string
+ searchAccount?: string
+ searchVideo?: string
+}) {
+ const { url, token, start, count, sort, isLocal, search, searchAccount, searchVideo } = options
+ const path = '/api/v1/videos/comments'
+
+ const query = {
+ start,
+ count,
+ sort: sort || '-createdAt'
+ }
+
+ if (isLocal !== undefined) Object.assign(query, { isLocal })
+ if (search !== undefined) Object.assign(query, { search })
+ if (searchAccount !== undefined) Object.assign(query, { searchAccount })
+ if (searchVideo !== undefined) Object.assign(query, { searchVideo })
+
+ return makeGetRequest({
+ url,
+ path,
+ token,
+ query,
+ statusCodeExpected: HttpStatusCode.OK_200
+ })
+}