diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/core-utils/miscs/date.ts | 49 | ||||
-rw-r--r-- | shared/extra-utils/miscs/sql.ts | 35 | ||||
-rw-r--r-- | shared/extra-utils/server/config.ts | 1 | ||||
-rw-r--r-- | shared/extra-utils/server/servers.ts | 4 | ||||
-rw-r--r-- | shared/extra-utils/users/accounts.ts | 4 | ||||
-rw-r--r-- | shared/extra-utils/users/user-notifications.ts | 2 | ||||
-rw-r--r-- | shared/extra-utils/users/users.ts | 27 | ||||
-rw-r--r-- | shared/extra-utils/videos/video-channels.ts | 37 | ||||
-rw-r--r-- | shared/extra-utils/videos/video-playlists.ts | 4 | ||||
-rw-r--r-- | shared/extra-utils/videos/videos.ts | 6 | ||||
-rw-r--r-- | shared/models/activitypub/activitypub-actor.ts | 1 | ||||
-rw-r--r-- | shared/models/actors/account.model.ts | 1 | ||||
-rw-r--r-- | shared/models/actors/actor.model.ts | 1 | ||||
-rw-r--r-- | shared/models/server/custom-config.model.ts | 1 | ||||
-rw-r--r-- | shared/models/users/user-register.model.ts | 10 | ||||
-rw-r--r-- | shared/models/videos/channel/video-channel-update.model.ts | 4 | ||||
-rw-r--r-- | shared/models/videos/channel/video-channel.model.ts | 1 |
17 files changed, 143 insertions, 45 deletions
diff --git a/shared/core-utils/miscs/date.ts b/shared/core-utils/miscs/date.ts new file mode 100644 index 000000000..7f0b4443b --- /dev/null +++ b/shared/core-utils/miscs/date.ts | |||
@@ -0,0 +1,49 @@ | |||
1 | function isToday (d: Date) { | ||
2 | const today = new Date() | ||
3 | |||
4 | return areDatesEqual(d, today) | ||
5 | } | ||
6 | |||
7 | function isYesterday (d: Date) { | ||
8 | const yesterday = new Date() | ||
9 | yesterday.setDate(yesterday.getDate() - 1) | ||
10 | |||
11 | return areDatesEqual(d, yesterday) | ||
12 | } | ||
13 | |||
14 | function isThisWeek (d: Date) { | ||
15 | const minDateOfThisWeek = new Date() | ||
16 | minDateOfThisWeek.setHours(0, 0, 0) | ||
17 | |||
18 | // getDay() -> Sunday - Saturday : 0 - 6 | ||
19 | // We want to start our week on Monday | ||
20 | let dayOfWeek = minDateOfThisWeek.getDay() - 1 | ||
21 | if (dayOfWeek < 0) dayOfWeek = 6 // Sunday | ||
22 | |||
23 | minDateOfThisWeek.setDate(minDateOfThisWeek.getDate() - dayOfWeek) | ||
24 | |||
25 | return d >= minDateOfThisWeek | ||
26 | } | ||
27 | |||
28 | function isThisMonth (d: Date) { | ||
29 | const thisMonth = new Date().getMonth() | ||
30 | |||
31 | return d.getMonth() === thisMonth | ||
32 | } | ||
33 | |||
34 | // --------------------------------------------------------------------------- | ||
35 | |||
36 | export { | ||
37 | isYesterday, | ||
38 | isThisWeek, | ||
39 | isThisMonth, | ||
40 | isToday | ||
41 | } | ||
42 | |||
43 | // --------------------------------------------------------------------------- | ||
44 | |||
45 | function areDatesEqual (d1: Date, d2: Date) { | ||
46 | return d1.getFullYear() === d2.getFullYear() && | ||
47 | d1.getMonth() === d2.getMonth() && | ||
48 | d1.getDate() === d2.getDate() | ||
49 | } | ||
diff --git a/shared/extra-utils/miscs/sql.ts b/shared/extra-utils/miscs/sql.ts index 3cfae5c23..34477cb78 100644 --- a/shared/extra-utils/miscs/sql.ts +++ b/shared/extra-utils/miscs/sql.ts | |||
@@ -1,11 +1,12 @@ | |||
1 | import { QueryTypes, Sequelize } from 'sequelize' | 1 | import { QueryTypes, Sequelize } from 'sequelize' |
2 | import { ServerInfo } from '../server/servers' | ||
2 | 3 | ||
3 | let sequelizes: { [ id: number ]: Sequelize } = {} | 4 | let sequelizes: { [ id: number ]: Sequelize } = {} |
4 | 5 | ||
5 | function getSequelize (serverNumber: number) { | 6 | function getSequelize (internalServerNumber: number) { |
6 | if (sequelizes[serverNumber]) return sequelizes[serverNumber] | 7 | if (sequelizes[internalServerNumber]) return sequelizes[internalServerNumber] |
7 | 8 | ||
8 | const dbname = 'peertube_test' + serverNumber | 9 | const dbname = 'peertube_test' + internalServerNumber |
9 | const username = 'peertube' | 10 | const username = 'peertube' |
10 | const password = 'peertube' | 11 | const password = 'peertube' |
11 | const host = 'localhost' | 12 | const host = 'localhost' |
@@ -18,37 +19,37 @@ function getSequelize (serverNumber: number) { | |||
18 | logging: false | 19 | logging: false |
19 | }) | 20 | }) |
20 | 21 | ||
21 | sequelizes[serverNumber] = seq | 22 | sequelizes[internalServerNumber] = seq |
22 | 23 | ||
23 | return seq | 24 | return seq |
24 | } | 25 | } |
25 | 26 | ||
26 | function setActorField (serverNumber: number, to: string, field: string, value: string) { | 27 | function setActorField (internalServerNumber: number, to: string, field: string, value: string) { |
27 | const seq = getSequelize(serverNumber) | 28 | const seq = getSequelize(internalServerNumber) |
28 | 29 | ||
29 | const options = { type: QueryTypes.UPDATE } | 30 | const options = { type: QueryTypes.UPDATE } |
30 | 31 | ||
31 | return seq.query(`UPDATE actor SET "${field}" = '${value}' WHERE url = '${to}'`, options) | 32 | return seq.query(`UPDATE actor SET "${field}" = '${value}' WHERE url = '${to}'`, options) |
32 | } | 33 | } |
33 | 34 | ||
34 | function setVideoField (serverNumber: number, uuid: string, field: string, value: string) { | 35 | function setVideoField (internalServerNumber: number, uuid: string, field: string, value: string) { |
35 | const seq = getSequelize(serverNumber) | 36 | const seq = getSequelize(internalServerNumber) |
36 | 37 | ||
37 | const options = { type: QueryTypes.UPDATE } | 38 | const options = { type: QueryTypes.UPDATE } |
38 | 39 | ||
39 | return seq.query(`UPDATE video SET "${field}" = '${value}' WHERE uuid = '${uuid}'`, options) | 40 | return seq.query(`UPDATE video SET "${field}" = '${value}' WHERE uuid = '${uuid}'`, options) |
40 | } | 41 | } |
41 | 42 | ||
42 | function setPlaylistField (serverNumber: number, uuid: string, field: string, value: string) { | 43 | function setPlaylistField (internalServerNumber: number, uuid: string, field: string, value: string) { |
43 | const seq = getSequelize(serverNumber) | 44 | const seq = getSequelize(internalServerNumber) |
44 | 45 | ||
45 | const options = { type: QueryTypes.UPDATE } | 46 | const options = { type: QueryTypes.UPDATE } |
46 | 47 | ||
47 | return seq.query(`UPDATE "videoPlaylist" SET "${field}" = '${value}' WHERE uuid = '${uuid}'`, options) | 48 | return seq.query(`UPDATE "videoPlaylist" SET "${field}" = '${value}' WHERE uuid = '${uuid}'`, options) |
48 | } | 49 | } |
49 | 50 | ||
50 | async function countVideoViewsOf (serverNumber: number, uuid: string) { | 51 | async function countVideoViewsOf (internalServerNumber: number, uuid: string) { |
51 | const seq = getSequelize(serverNumber) | 52 | const seq = getSequelize(internalServerNumber) |
52 | 53 | ||
53 | // tslint:disable | 54 | // tslint:disable |
54 | const query = `SELECT SUM("videoView"."views") AS "total" FROM "videoView" INNER JOIN "video" ON "video"."id" = "videoView"."videoId" WHERE "video"."uuid" = '${uuid}'` | 55 | const query = `SELECT SUM("videoView"."views") AS "total" FROM "videoView" INNER JOIN "video" ON "video"."id" = "videoView"."videoId" WHERE "video"."uuid" = '${uuid}'` |
@@ -62,11 +63,11 @@ async function countVideoViewsOf (serverNumber: number, uuid: string) { | |||
62 | return parseInt(total + '', 10) | 63 | return parseInt(total + '', 10) |
63 | } | 64 | } |
64 | 65 | ||
65 | async function closeAllSequelize (servers: any[]) { | 66 | async function closeAllSequelize (servers: ServerInfo[]) { |
66 | for (let i = 1; i <= servers.length; i++) { | 67 | for (const server of servers) { |
67 | if (sequelizes[ i ]) { | 68 | if (sequelizes[ server.internalServerNumber ]) { |
68 | await sequelizes[ i ].close() | 69 | await sequelizes[ server.internalServerNumber ].close() |
69 | delete sequelizes[ i ] | 70 | delete sequelizes[ server.internalServerNumber ] |
70 | } | 71 | } |
71 | } | 72 | } |
72 | } | 73 | } |
diff --git a/shared/extra-utils/server/config.ts b/shared/extra-utils/server/config.ts index deb77e9c0..a5f5989e0 100644 --- a/shared/extra-utils/server/config.ts +++ b/shared/extra-utils/server/config.ts | |||
@@ -91,6 +91,7 @@ function updateCustomSubConfig (url: string, token: string, newConfig: any) { | |||
91 | transcoding: { | 91 | transcoding: { |
92 | enabled: true, | 92 | enabled: true, |
93 | allowAdditionalExtensions: true, | 93 | allowAdditionalExtensions: true, |
94 | allowAudioFiles: true, | ||
94 | threads: 1, | 95 | threads: 1, |
95 | resolutions: { | 96 | resolutions: { |
96 | '240p': false, | 97 | '240p': false, |
diff --git a/shared/extra-utils/server/servers.ts b/shared/extra-utils/server/servers.ts index ed41bfa48..4c7d6862a 100644 --- a/shared/extra-utils/server/servers.ts +++ b/shared/extra-utils/server/servers.ts | |||
@@ -246,7 +246,7 @@ async function checkTmpIsEmpty (server: ServerInfo) { | |||
246 | } | 246 | } |
247 | 247 | ||
248 | async function checkDirectoryIsEmpty (server: ServerInfo, directory: string) { | 248 | async function checkDirectoryIsEmpty (server: ServerInfo, directory: string) { |
249 | const testDirectory = 'test' + server.serverNumber | 249 | const testDirectory = 'test' + server.internalServerNumber |
250 | 250 | ||
251 | const directoryPath = join(root(), testDirectory, directory) | 251 | const directoryPath = join(root(), testDirectory, directory) |
252 | 252 | ||
@@ -284,7 +284,7 @@ function cleanupTests (servers: ServerInfo[]) { | |||
284 | } | 284 | } |
285 | 285 | ||
286 | async function waitUntilLog (server: ServerInfo, str: string, count = 1) { | 286 | async function waitUntilLog (server: ServerInfo, str: string, count = 1) { |
287 | const logfile = join(root(), 'test' + server.serverNumber, 'logs/peertube.log') | 287 | const logfile = join(root(), 'test' + server.internalServerNumber, 'logs/peertube.log') |
288 | 288 | ||
289 | while (true) { | 289 | while (true) { |
290 | const buf = await readFile(logfile) | 290 | const buf = await readFile(logfile) |
diff --git a/shared/extra-utils/users/accounts.ts b/shared/extra-utils/users/accounts.ts index f64a2dbad..627e17cc3 100644 --- a/shared/extra-utils/users/accounts.ts +++ b/shared/extra-utils/users/accounts.ts | |||
@@ -39,7 +39,7 @@ async function expectAccountFollows (url: string, nameWithDomain: string, follow | |||
39 | expect(account.followingCount).to.equal(followingCount, message) | 39 | expect(account.followingCount).to.equal(followingCount, message) |
40 | } | 40 | } |
41 | 41 | ||
42 | async function checkActorFilesWereRemoved (actorUUID: string, serverNumber: number) { | 42 | async function checkActorFilesWereRemoved (filename: string, serverNumber: number) { |
43 | const testDirectory = 'test' + serverNumber | 43 | const testDirectory = 'test' + serverNumber |
44 | 44 | ||
45 | for (const directory of [ 'avatars' ]) { | 45 | for (const directory of [ 'avatars' ]) { |
@@ -50,7 +50,7 @@ async function checkActorFilesWereRemoved (actorUUID: string, serverNumber: numb | |||
50 | 50 | ||
51 | const files = await readdir(directoryPath) | 51 | const files = await readdir(directoryPath) |
52 | for (const file of files) { | 52 | for (const file of files) { |
53 | expect(file).to.not.contain(actorUUID) | 53 | expect(file).to.not.contain(filename) |
54 | } | 54 | } |
55 | } | 55 | } |
56 | } | 56 | } |
diff --git a/shared/extra-utils/users/user-notifications.ts b/shared/extra-utils/users/user-notifications.ts index 495ff80d9..f7de542bf 100644 --- a/shared/extra-utils/users/user-notifications.ts +++ b/shared/extra-utils/users/user-notifications.ts | |||
@@ -380,7 +380,7 @@ async function checkNewCommentOnMyVideo (base: CheckerBaseParams, uuid: string, | |||
380 | } | 380 | } |
381 | } | 381 | } |
382 | 382 | ||
383 | const commentUrl = `http://localhost:9001/videos/watch/${uuid};threadId=${threadId}` | 383 | const commentUrl = `http://localhost:${base.server.port}/videos/watch/${uuid};threadId=${threadId}` |
384 | function emailFinder (email: object) { | 384 | function emailFinder (email: object) { |
385 | return email[ 'text' ].indexOf(commentUrl) !== -1 | 385 | return email[ 'text' ].indexOf(commentUrl) !== -1 |
386 | } | 386 | } |
diff --git a/shared/extra-utils/users/users.ts b/shared/extra-utils/users/users.ts index 2bd37b8be..c00da19e0 100644 --- a/shared/extra-utils/users/users.ts +++ b/shared/extra-utils/users/users.ts | |||
@@ -1,10 +1,11 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { makePostBodyRequest, makePutBodyRequest, updateAvatarRequest } from '../requests/requests' | 2 | import { makeGetRequest, makePostBodyRequest, makePutBodyRequest, updateAvatarRequest } from '../requests/requests' |
3 | 3 | ||
4 | import { UserRole } from '../../index' | 4 | import { UserCreate, UserRole } from '../../index' |
5 | import { NSFWPolicyType } from '../../models/videos/nsfw-policy.type' | 5 | import { NSFWPolicyType } from '../../models/videos/nsfw-policy.type' |
6 | import { ServerInfo, userLogin } from '..' | 6 | import { ServerInfo, userLogin } from '..' |
7 | import { UserAdminFlag } from '../../models/users/user-flag.model' | 7 | import { UserAdminFlag } from '../../models/users/user-flag.model' |
8 | import { UserRegister } from '../../models/users/user-register.model' | ||
8 | 9 | ||
9 | type CreateUserArgs = { url: string, | 10 | type CreateUserArgs = { url: string, |
10 | accessToken: string, | 11 | accessToken: string, |
@@ -70,6 +71,27 @@ function registerUser (url: string, username: string, password: string, specialS | |||
70 | .expect(specialStatus) | 71 | .expect(specialStatus) |
71 | } | 72 | } |
72 | 73 | ||
74 | function registerUserWithChannel (options: { | ||
75 | url: string, | ||
76 | user: { username: string, password: string }, | ||
77 | channel: { name: string, displayName: string } | ||
78 | }) { | ||
79 | const path = '/api/v1/users/register' | ||
80 | const body: UserRegister = { | ||
81 | username: options.user.username, | ||
82 | password: options.user.password, | ||
83 | email: options.user.username + '@example.com', | ||
84 | channel: options.channel | ||
85 | } | ||
86 | |||
87 | return makePostBodyRequest({ | ||
88 | url: options.url, | ||
89 | path, | ||
90 | fields: body, | ||
91 | statusCodeExpected: 204 | ||
92 | }) | ||
93 | } | ||
94 | |||
73 | function getMyUserInformation (url: string, accessToken: string, specialStatus = 200) { | 95 | function getMyUserInformation (url: string, accessToken: string, specialStatus = 200) { |
74 | const path = '/api/v1/users/me' | 96 | const path = '/api/v1/users/me' |
75 | 97 | ||
@@ -312,6 +334,7 @@ export { | |||
312 | getMyUserInformation, | 334 | getMyUserInformation, |
313 | getMyUserVideoRating, | 335 | getMyUserVideoRating, |
314 | deleteMe, | 336 | deleteMe, |
337 | registerUserWithChannel, | ||
315 | getMyUserVideoQuotaUsed, | 338 | getMyUserVideoQuotaUsed, |
316 | getUsersList, | 339 | getUsersList, |
317 | getUsersListPaginationAndSort, | 340 | getUsersListPaginationAndSort, |
diff --git a/shared/extra-utils/videos/video-channels.ts b/shared/extra-utils/videos/video-channels.ts index 93a257bf9..3e79cf15a 100644 --- a/shared/extra-utils/videos/video-channels.ts +++ b/shared/extra-utils/videos/video-channels.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { VideoChannelCreate, VideoChannelUpdate } from '../../models/videos' | 2 | import { VideoChannelCreate, VideoChannelUpdate } from '../../models/videos' |
3 | import { updateAvatarRequest } from '../requests/requests' | 3 | import { makeGetRequest, updateAvatarRequest } from '../requests/requests' |
4 | import { getMyUserInformation, ServerInfo } from '..' | 4 | import { getMyUserInformation, ServerInfo } from '..' |
5 | import { User } from '../..' | 5 | import { User } from '../..' |
6 | 6 | ||
@@ -19,14 +19,28 @@ function getVideoChannelsList (url: string, start: number, count: number, sort?: | |||
19 | .expect('Content-Type', /json/) | 19 | .expect('Content-Type', /json/) |
20 | } | 20 | } |
21 | 21 | ||
22 | function getAccountVideoChannelsList (url: string, accountName: string, specialStatus = 200) { | 22 | function getAccountVideoChannelsList (parameters: { |
23 | url: string, | ||
24 | accountName: string, | ||
25 | start?: number, | ||
26 | count?: number, | ||
27 | sort?: string, | ||
28 | specialStatus?: number | ||
29 | }) { | ||
30 | const { url, accountName, start, count, sort = 'createdAt', specialStatus = 200 } = parameters | ||
31 | |||
23 | const path = '/api/v1/accounts/' + accountName + '/video-channels' | 32 | const path = '/api/v1/accounts/' + accountName + '/video-channels' |
24 | 33 | ||
25 | return request(url) | 34 | return makeGetRequest({ |
26 | .get(path) | 35 | url, |
27 | .set('Accept', 'application/json') | 36 | path, |
28 | .expect(specialStatus) | 37 | query: { |
29 | .expect('Content-Type', /json/) | 38 | start, |
39 | count, | ||
40 | sort | ||
41 | }, | ||
42 | statusCodeExpected: specialStatus | ||
43 | }) | ||
30 | } | 44 | } |
31 | 45 | ||
32 | function addVideoChannel ( | 46 | function addVideoChannel ( |
@@ -60,12 +74,13 @@ function updateVideoChannel ( | |||
60 | attributes: VideoChannelUpdate, | 74 | attributes: VideoChannelUpdate, |
61 | expectedStatus = 204 | 75 | expectedStatus = 204 |
62 | ) { | 76 | ) { |
63 | const body = {} | 77 | const body: any = {} |
64 | const path = '/api/v1/video-channels/' + channelName | 78 | const path = '/api/v1/video-channels/' + channelName |
65 | 79 | ||
66 | if (attributes.displayName) body['displayName'] = attributes.displayName | 80 | if (attributes.displayName) body.displayName = attributes.displayName |
67 | if (attributes.description) body['description'] = attributes.description | 81 | if (attributes.description) body.description = attributes.description |
68 | if (attributes.support) body['support'] = attributes.support | 82 | if (attributes.support) body.support = attributes.support |
83 | if (attributes.bulkVideosSupportUpdate) body.bulkVideosSupportUpdate = attributes.bulkVideosSupportUpdate | ||
69 | 84 | ||
70 | return request(url) | 85 | return request(url) |
71 | .put(path) | 86 | .put(path) |
diff --git a/shared/extra-utils/videos/video-playlists.ts b/shared/extra-utils/videos/video-playlists.ts index 4d110a131..fd62bef19 100644 --- a/shared/extra-utils/videos/video-playlists.ts +++ b/shared/extra-utils/videos/video-playlists.ts | |||
@@ -252,10 +252,10 @@ function reorderVideosPlaylist (options: { | |||
252 | 252 | ||
253 | async function checkPlaylistFilesWereRemoved ( | 253 | async function checkPlaylistFilesWereRemoved ( |
254 | playlistUUID: string, | 254 | playlistUUID: string, |
255 | serverNumber: number, | 255 | internalServerNumber: number, |
256 | directories = [ 'thumbnails' ] | 256 | directories = [ 'thumbnails' ] |
257 | ) { | 257 | ) { |
258 | const testDirectory = 'test' + serverNumber | 258 | const testDirectory = 'test' + internalServerNumber |
259 | 259 | ||
260 | for (const directory of directories) { | 260 | for (const directory of directories) { |
261 | const directoryPath = join(root(), testDirectory, directory) | 261 | const directoryPath = join(root(), testDirectory, directory) |
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts index b5a07b792..debaaf9a7 100644 --- a/shared/extra-utils/videos/videos.ts +++ b/shared/extra-utils/videos/videos.ts | |||
@@ -355,6 +355,7 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg | |||
355 | .set('Accept', 'application/json') | 355 | .set('Accept', 'application/json') |
356 | .set('Authorization', 'Bearer ' + accessToken) | 356 | .set('Authorization', 'Bearer ' + accessToken) |
357 | .field('name', attributes.name) | 357 | .field('name', attributes.name) |
358 | .field('support', attributes.support) | ||
358 | .field('nsfw', JSON.stringify(attributes.nsfw)) | 359 | .field('nsfw', JSON.stringify(attributes.nsfw)) |
359 | .field('commentsEnabled', JSON.stringify(attributes.commentsEnabled)) | 360 | .field('commentsEnabled', JSON.stringify(attributes.commentsEnabled)) |
360 | .field('downloadEnabled', JSON.stringify(attributes.downloadEnabled)) | 361 | .field('downloadEnabled', JSON.stringify(attributes.downloadEnabled)) |
@@ -524,7 +525,6 @@ async function completeVideoCheck ( | |||
524 | expect(video.nsfw).to.equal(attributes.nsfw) | 525 | expect(video.nsfw).to.equal(attributes.nsfw) |
525 | expect(video.description).to.equal(attributes.description) | 526 | expect(video.description).to.equal(attributes.description) |
526 | expect(video.account.id).to.be.a('number') | 527 | expect(video.account.id).to.be.a('number') |
527 | expect(video.account.uuid).to.be.a('string') | ||
528 | expect(video.account.host).to.equal(attributes.account.host) | 528 | expect(video.account.host).to.equal(attributes.account.host) |
529 | expect(video.account.name).to.equal(attributes.account.name) | 529 | expect(video.account.name).to.equal(attributes.account.name) |
530 | expect(video.channel.displayName).to.equal(attributes.channel.displayName) | 530 | expect(video.channel.displayName).to.equal(attributes.channel.displayName) |
@@ -568,8 +568,8 @@ async function completeVideoCheck ( | |||
568 | expect(file).not.to.be.undefined | 568 | expect(file).not.to.be.undefined |
569 | 569 | ||
570 | let extension = extname(attributes.fixture) | 570 | let extension = extname(attributes.fixture) |
571 | // Transcoding enabled on server 2, extension will always be .mp4 | 571 | // Transcoding enabled: extension will always be .mp4 |
572 | if (attributes.account.host === 'localhost:9002') extension = '.mp4' | 572 | if (attributes.files.length > 1) extension = '.mp4' |
573 | 573 | ||
574 | const magnetUri = file.magnetUri | 574 | const magnetUri = file.magnetUri |
575 | expect(file.magnetUri).to.have.lengthOf.above(2) | 575 | expect(file.magnetUri).to.have.lengthOf.above(2) |
diff --git a/shared/models/activitypub/activitypub-actor.ts b/shared/models/activitypub/activitypub-actor.ts index 5e30bf783..53ec579bc 100644 --- a/shared/models/activitypub/activitypub-actor.ts +++ b/shared/models/activitypub/activitypub-actor.ts | |||
@@ -21,7 +21,6 @@ export interface ActivityPubActor { | |||
21 | attributedTo: ActivityPubAttributedTo[] | 21 | attributedTo: ActivityPubAttributedTo[] |
22 | 22 | ||
23 | support?: string | 23 | support?: string |
24 | uuid: string | ||
25 | publicKey: { | 24 | publicKey: { |
26 | id: string | 25 | id: string |
27 | owner: string | 26 | owner: string |
diff --git a/shared/models/actors/account.model.ts b/shared/models/actors/account.model.ts index 043a2507e..2ff4b9f5e 100644 --- a/shared/models/actors/account.model.ts +++ b/shared/models/actors/account.model.ts | |||
@@ -10,7 +10,6 @@ export interface Account extends Actor { | |||
10 | 10 | ||
11 | export interface AccountSummary { | 11 | export interface AccountSummary { |
12 | id: number | 12 | id: number |
13 | uuid: string | ||
14 | name: string | 13 | name: string |
15 | displayName: string | 14 | displayName: string |
16 | url: string | 15 | url: string |
diff --git a/shared/models/actors/actor.model.ts b/shared/models/actors/actor.model.ts index a3953874d..1dbf5f638 100644 --- a/shared/models/actors/actor.model.ts +++ b/shared/models/actors/actor.model.ts | |||
@@ -2,7 +2,6 @@ import { Avatar } from '../avatars/avatar.model' | |||
2 | 2 | ||
3 | export interface Actor { | 3 | export interface Actor { |
4 | id: number | 4 | id: number |
5 | uuid: string | ||
6 | url: string | 5 | url: string |
7 | name: string | 6 | name: string |
8 | host: string | 7 | host: string |
diff --git a/shared/models/server/custom-config.model.ts b/shared/models/server/custom-config.model.ts index ca52eff4b..4cc379b2a 100644 --- a/shared/models/server/custom-config.model.ts +++ b/shared/models/server/custom-config.model.ts | |||
@@ -54,6 +54,7 @@ export interface CustomConfig { | |||
54 | transcoding: { | 54 | transcoding: { |
55 | enabled: boolean | 55 | enabled: boolean |
56 | allowAdditionalExtensions: boolean | 56 | allowAdditionalExtensions: boolean |
57 | allowAudioFiles: boolean | ||
57 | threads: number | 58 | threads: number |
58 | resolutions: { | 59 | resolutions: { |
59 | '240p': boolean | 60 | '240p': boolean |
diff --git a/shared/models/users/user-register.model.ts b/shared/models/users/user-register.model.ts new file mode 100644 index 000000000..ce5c9c3d2 --- /dev/null +++ b/shared/models/users/user-register.model.ts | |||
@@ -0,0 +1,10 @@ | |||
1 | export interface UserRegister { | ||
2 | username: string | ||
3 | password: string | ||
4 | email: string | ||
5 | |||
6 | channel?: { | ||
7 | name: string | ||
8 | displayName: string | ||
9 | } | ||
10 | } | ||
diff --git a/shared/models/videos/channel/video-channel-update.model.ts b/shared/models/videos/channel/video-channel-update.model.ts index 3626ce8a9..8dde9188b 100644 --- a/shared/models/videos/channel/video-channel-update.model.ts +++ b/shared/models/videos/channel/video-channel-update.model.ts | |||
@@ -1,5 +1,7 @@ | |||
1 | export interface VideoChannelUpdate { | 1 | export interface VideoChannelUpdate { |
2 | displayName: string | 2 | displayName?: string |
3 | description?: string | 3 | description?: string |
4 | support?: string | 4 | support?: string |
5 | |||
6 | bulkVideosSupportUpdate?: boolean | ||
5 | } | 7 | } |
diff --git a/shared/models/videos/channel/video-channel.model.ts b/shared/models/videos/channel/video-channel.model.ts index 14a813f8f..de4c26b3d 100644 --- a/shared/models/videos/channel/video-channel.model.ts +++ b/shared/models/videos/channel/video-channel.model.ts | |||
@@ -12,7 +12,6 @@ export interface VideoChannel extends Actor { | |||
12 | 12 | ||
13 | export interface VideoChannelSummary { | 13 | export interface VideoChannelSummary { |
14 | id: number | 14 | id: number |
15 | uuid: string | ||
16 | name: string | 15 | name: string |
17 | displayName: string | 16 | displayName: string |
18 | url: string | 17 | url: string |