aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-11-19 08:25:07 +0100
committerChocobozzz <me@florianbigard.com>2021-11-19 08:26:22 +0100
commit5d3c5f27977bf8d690a606c65a0f8ce11f4341ed (patch)
tree3ad1a5f5ea8d50d3bdbd248053d09cd343a3bf8d
parent4842e518be6fa3fc6f92e1e6475549ce9c173b74 (diff)
downloadPeerTube-5d3c5f27977bf8d690a606c65a0f8ce11f4341ed.tar.gz
PeerTube-5d3c5f27977bf8d690a606c65a0f8ce11f4341ed.tar.zst
PeerTube-5d3c5f27977bf8d690a606c65a0f8ce11f4341ed.zip
Fix typo
-rw-r--r--server/tests/api/check-params/video-files.ts2
-rw-r--r--server/tests/api/notifications/user-notifications.ts6
-rw-r--r--shared/extra-utils/users/notifications-command.ts2
-rw-r--r--shared/extra-utils/users/notifications.ts2
4 files changed, 6 insertions, 6 deletions
diff --git a/server/tests/api/check-params/video-files.ts b/server/tests/api/check-params/video-files.ts
index 61936d562..3ccdf5f49 100644
--- a/server/tests/api/check-params/video-files.ts
+++ b/server/tests/api/check-params/video-files.ts
@@ -20,7 +20,7 @@ describe('Test videos files', function () {
20 // --------------------------------------------------------------- 20 // ---------------------------------------------------------------
21 21
22 before(async function () { 22 before(async function () {
23 this.timeout(150_000) 23 this.timeout(300_000)
24 24
25 servers = await createMultipleServers(2) 25 servers = await createMultipleServers(2)
26 await setAccessTokensToServers(servers) 26 await setAccessTokensToServers(servers)
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index e53ab2aa5..468efdf35 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -61,7 +61,7 @@ describe('Test user notifications', function () {
61 61
62 await uploadRandomVideoOnServers(servers, 1) 62 await uploadRandomVideoOnServers(servers, 1)
63 63
64 const notification = await servers[0].notifications.getLastest({ token: userAccessToken }) 64 const notification = await servers[0].notifications.getLatest({ token: userAccessToken })
65 expect(notification).to.be.undefined 65 expect(notification).to.be.undefined
66 66
67 expect(emails).to.have.lengthOf(0) 67 expect(emails).to.have.lengthOf(0)
@@ -237,12 +237,12 @@ describe('Test user notifications', function () {
237 }) 237 })
238 238
239 it('Should not send a notification if the wait transcoding is false', async function () { 239 it('Should not send a notification if the wait transcoding is false', async function () {
240 this.timeout(50000) 240 this.timeout(100_000)
241 241
242 await uploadRandomVideoOnServers(servers, 2, { waitTranscoding: false }) 242 await uploadRandomVideoOnServers(servers, 2, { waitTranscoding: false })
243 await waitJobs(servers) 243 await waitJobs(servers)
244 244
245 const notification = await servers[0].notifications.getLastest({ token: userAccessToken }) 245 const notification = await servers[0].notifications.getLatest({ token: userAccessToken })
246 if (notification) { 246 if (notification) {
247 expect(notification.type).to.not.equal(UserNotificationType.MY_VIDEO_PUBLISHED) 247 expect(notification.type).to.not.equal(UserNotificationType.MY_VIDEO_PUBLISHED)
248 } 248 }
diff --git a/shared/extra-utils/users/notifications-command.ts b/shared/extra-utils/users/notifications-command.ts
index 2d79a3747..692420b8b 100644
--- a/shared/extra-utils/users/notifications-command.ts
+++ b/shared/extra-utils/users/notifications-command.ts
@@ -71,7 +71,7 @@ export class NotificationsCommand extends AbstractCommand {
71 }) 71 })
72 } 72 }
73 73
74 async getLastest (options: OverrideCommandOptions = {}) { 74 async getLatest (options: OverrideCommandOptions = {}) {
75 const { total, data } = await this.list({ 75 const { total, data } = await this.list({
76 ...options, 76 ...options,
77 start: 0, 77 start: 0,
diff --git a/shared/extra-utils/users/notifications.ts b/shared/extra-utils/users/notifications.ts
index 7db4bfd3f..07ccb0f8d 100644
--- a/shared/extra-utils/users/notifications.ts
+++ b/shared/extra-utils/users/notifications.ts
@@ -727,7 +727,7 @@ async function checkNotification (options: CheckerBaseParams & {
727 const check = options.check || { web: true, mail: true } 727 const check = options.check || { web: true, mail: true }
728 728
729 if (check.web) { 729 if (check.web) {
730 const notification = await server.notifications.getLastest({ token: token }) 730 const notification = await server.notifications.getLatest({ token: token })
731 731
732 if (notification || checkType !== 'absence') { 732 if (notification || checkType !== 'absence') {
733 notificationChecker(notification, checkType) 733 notificationChecker(notification, checkType)