diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/models/account/account.ts | 3 | ||||
-rw-r--r-- | server/models/video/video-format-utils.ts | 2 | ||||
-rw-r--r-- | server/models/video/video.ts | 1 | ||||
-rw-r--r-- | server/tests/api/users/users-multiple-servers.ts | 6 |
4 files changed, 9 insertions, 3 deletions
diff --git a/server/models/account/account.ts b/server/models/account/account.ts index 27c75d886..5a237d733 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts | |||
@@ -248,7 +248,8 @@ export class AccountModel extends Model<AccountModel> { | |||
248 | displayName: this.getDisplayName(), | 248 | displayName: this.getDisplayName(), |
249 | description: this.description, | 249 | description: this.description, |
250 | createdAt: this.createdAt, | 250 | createdAt: this.createdAt, |
251 | updatedAt: this.updatedAt | 251 | updatedAt: this.updatedAt, |
252 | userId: this.userId ? this.userId : undefined | ||
252 | } | 253 | } |
253 | 254 | ||
254 | return Object.assign(actor, account) | 255 | return Object.assign(actor, account) |
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts index 78972b199..905e84449 100644 --- a/server/models/video/video-format-utils.ts +++ b/server/models/video/video-format-utils.ts | |||
@@ -10,7 +10,7 @@ import { | |||
10 | getVideoLikesActivityPubUrl, | 10 | getVideoLikesActivityPubUrl, |
11 | getVideoSharesActivityPubUrl | 11 | getVideoSharesActivityPubUrl |
12 | } from '../../lib/activitypub' | 12 | } from '../../lib/activitypub' |
13 | import { isArray } from 'util' | 13 | import { isArray } from '../../helpers/custom-validators/misc' |
14 | 14 | ||
15 | export type VideoFormattingJSONOptions = { | 15 | export type VideoFormattingJSONOptions = { |
16 | completeDescription?: boolean | 16 | completeDescription?: boolean |
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 0a2d7e6de..46d823240 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -94,7 +94,6 @@ import { | |||
94 | import * as validator from 'validator' | 94 | import * as validator from 'validator' |
95 | import { UserVideoHistoryModel } from '../account/user-video-history' | 95 | import { UserVideoHistoryModel } from '../account/user-video-history' |
96 | 96 | ||
97 | |||
98 | // FIXME: Define indexes here because there is an issue with TS and Sequelize.literal when called directly in the annotation | 97 | // FIXME: Define indexes here because there is an issue with TS and Sequelize.literal when called directly in the annotation |
99 | const indexes: Sequelize.DefineIndexesOptions[] = [ | 98 | const indexes: Sequelize.DefineIndexesOptions[] = [ |
100 | buildTrigramSearchIndex('video_name_trigram', 'name'), | 99 | buildTrigramSearchIndex('video_name_trigram', 'name'), |
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts index b67072851..d8699db17 100644 --- a/server/tests/api/users/users-multiple-servers.ts +++ b/server/tests/api/users/users-multiple-servers.ts | |||
@@ -148,6 +148,12 @@ describe('Test users with multiple servers', function () { | |||
148 | expect(rootServer1Get.displayName).to.equal('my super display name') | 148 | expect(rootServer1Get.displayName).to.equal('my super display name') |
149 | expect(rootServer1Get.description).to.equal('my super description updated') | 149 | expect(rootServer1Get.description).to.equal('my super description updated') |
150 | 150 | ||
151 | if (server.serverNumber === 1) { | ||
152 | expect(rootServer1Get.userId).to.be.a('number') | ||
153 | } else { | ||
154 | expect(rootServer1Get.userId).to.be.undefined | ||
155 | } | ||
156 | |||
151 | await testImage(server.url, 'avatar2-resized', rootServer1Get.avatar.path, '.png') | 157 | await testImage(server.url, 'avatar2-resized', rootServer1Get.avatar.path, '.png') |
152 | } | 158 | } |
153 | }) | 159 | }) |