diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-11 11:00:09 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-11 11:00:09 +0100 |
commit | 28f3d1b36a70426795240c9370e47b6c4ba847f8 (patch) | |
tree | fccd90a94deeab6e5ffc3b646280d5cba751c513 /server/controllers/api/videos | |
parent | b426edd4854adc6e65844d8c54b8998e792b5778 (diff) | |
parent | 1e7eb25f6cb6893db8f99ff40ef0509aa2a16614 (diff) | |
download | PeerTube-28f3d1b36a70426795240c9370e47b6c4ba847f8.tar.gz PeerTube-28f3d1b36a70426795240c9370e47b6c4ba847f8.tar.zst PeerTube-28f3d1b36a70426795240c9370e47b6c4ba847f8.zip |
Merge branch 'feature/correctly-send-activities' into develop
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r-- | server/controllers/api/videos/abuse.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/index.ts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/abuse.ts b/server/controllers/api/videos/abuse.ts index fe0a95cd5..32f9c4793 100644 --- a/server/controllers/api/videos/abuse.ts +++ b/server/controllers/api/videos/abuse.ts | |||
@@ -3,7 +3,6 @@ import { UserRight, VideoAbuseCreate, VideoAbuseState } from '../../../../shared | |||
3 | import { logger } from '../../../helpers/logger' | 3 | import { logger } from '../../../helpers/logger' |
4 | import { getFormattedObjects } from '../../../helpers/utils' | 4 | import { getFormattedObjects } from '../../../helpers/utils' |
5 | import { sequelizeTypescript } from '../../../initializers' | 5 | import { sequelizeTypescript } from '../../../initializers' |
6 | import { sendVideoAbuse } from '../../../lib/activitypub/send' | ||
7 | import { | 6 | import { |
8 | asyncMiddleware, | 7 | asyncMiddleware, |
9 | asyncRetryTransactionMiddleware, | 8 | asyncRetryTransactionMiddleware, |
@@ -23,6 +22,7 @@ import { VideoAbuseModel } from '../../../models/video/video-abuse' | |||
23 | import { auditLoggerFactory, VideoAbuseAuditView } from '../../../helpers/audit-logger' | 22 | import { auditLoggerFactory, VideoAbuseAuditView } from '../../../helpers/audit-logger' |
24 | import { UserModel } from '../../../models/account/user' | 23 | import { UserModel } from '../../../models/account/user' |
25 | import { Notifier } from '../../../lib/notifier' | 24 | import { Notifier } from '../../../lib/notifier' |
25 | import { sendVideoAbuse } from '../../../lib/activitypub/send/send-flag' | ||
26 | 26 | ||
27 | const auditLogger = auditLoggerFactory('abuse') | 27 | const auditLogger = auditLoggerFactory('abuse') |
28 | const abuseVideoRouter = express.Router() | 28 | const abuseVideoRouter = express.Router() |
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index e04fc8186..3b1c2d255 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -23,7 +23,6 @@ import { | |||
23 | fetchRemoteVideoDescription, | 23 | fetchRemoteVideoDescription, |
24 | getVideoActivityPubUrl | 24 | getVideoActivityPubUrl |
25 | } from '../../../lib/activitypub' | 25 | } from '../../../lib/activitypub' |
26 | import { sendCreateView } from '../../../lib/activitypub/send' | ||
27 | import { JobQueue } from '../../../lib/job-queue' | 26 | import { JobQueue } from '../../../lib/job-queue' |
28 | import { Redis } from '../../../lib/redis' | 27 | import { Redis } from '../../../lib/redis' |
29 | import { | 28 | import { |
@@ -60,6 +59,7 @@ import { resetSequelizeInstance } from '../../../helpers/database-utils' | |||
60 | import { move } from 'fs-extra' | 59 | import { move } from 'fs-extra' |
61 | import { watchingRouter } from './watching' | 60 | import { watchingRouter } from './watching' |
62 | import { Notifier } from '../../../lib/notifier' | 61 | import { Notifier } from '../../../lib/notifier' |
62 | import { sendView } from '../../../lib/activitypub/send/send-view' | ||
63 | 63 | ||
64 | const auditLogger = auditLoggerFactory('videos') | 64 | const auditLogger = auditLoggerFactory('videos') |
65 | const videosRouter = express.Router() | 65 | const videosRouter = express.Router() |
@@ -425,7 +425,7 @@ async function viewVideo (req: express.Request, res: express.Response) { | |||
425 | ]) | 425 | ]) |
426 | 426 | ||
427 | const serverActor = await getServerActor() | 427 | const serverActor = await getServerActor() |
428 | await sendCreateView(serverActor, videoInstance, undefined) | 428 | await sendView(serverActor, videoInstance, undefined) |
429 | 429 | ||
430 | return res.status(204).end() | 430 | return res.status(204).end() |
431 | } | 431 | } |