From 0883b3245bf0deb9106c4041e9afbd3521b79280 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 19 Apr 2018 11:01:34 +0200 Subject: Add ability to choose what policy we have for NSFW videos There is a global instance setting and a per user setting --- server/tests/utils/users/users.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/tests/utils/users') diff --git a/server/tests/utils/users/users.ts b/server/tests/utils/users/users.ts index daf731a14..fc6b26c50 100644 --- a/server/tests/utils/users/users.ts +++ b/server/tests/utils/users/users.ts @@ -3,6 +3,7 @@ import * as request from 'supertest' import { makePostBodyRequest, makeUploadRequest, makePutBodyRequest } from '../' import { UserRole } from '../../../../shared/index' +import { NSFWPolicyType } from '../../../../shared/models/videos/nsfw-policy.type' function createUser ( url: string, @@ -128,7 +129,7 @@ function updateMyUser (options: { url: string accessToken: string, newPassword?: string, - displayNSFW?: boolean, + nsfwPolicy?: NSFWPolicyType, email?: string, autoPlayVideo?: boolean description?: string @@ -137,7 +138,7 @@ function updateMyUser (options: { const toSend = {} if (options.newPassword !== undefined && options.newPassword !== null) toSend['password'] = options.newPassword - if (options.displayNSFW !== undefined && options.displayNSFW !== null) toSend['displayNSFW'] = options.displayNSFW + if (options.nsfwPolicy !== undefined && options.nsfwPolicy !== null) toSend['nsfwPolicy'] = options.nsfwPolicy if (options.autoPlayVideo !== undefined && options.autoPlayVideo !== null) toSend['autoPlayVideo'] = options.autoPlayVideo if (options.email !== undefined && options.email !== null) toSend['email'] = options.email if (options.description !== undefined && options.description !== null) toSend['description'] = options.description -- cgit v1.2.3