diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-28 10:18:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-28 10:18:15 +0100 |
commit | 6627dbc957477aa32e21ed1bdc8cd72b928cd616 (patch) | |
tree | e6dbe45b7259cc01ff0255887d45d331bc81026f /types/tests | |
parent | 52b356cfe257e8e0d357a498e87d9299c95cdbe5 (diff) | |
download | PeerTube-6627dbc957477aa32e21ed1bdc8cd72b928cd616.tar.gz PeerTube-6627dbc957477aa32e21ed1bdc8cd72b928cd616.tar.zst PeerTube-6627dbc957477aa32e21ed1bdc8cd72b928cd616.zip |
Move types package in packages/
Diffstat (limited to 'types/tests')
-rw-r--r-- | types/tests/test.ts | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/types/tests/test.ts b/types/tests/test.ts deleted file mode 100644 index 8c53320a1..000000000 --- a/types/tests/test.ts +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | import { RegisterServerOptions, Video } from '../dist' | ||
2 | import { RegisterClientOptions } from '../dist/client' | ||
3 | |||
4 | function register1 ({ registerHook }: RegisterServerOptions) { | ||
5 | registerHook({ | ||
6 | target: 'action:application.listening', | ||
7 | handler: () => console.log('hello') | ||
8 | }) | ||
9 | } | ||
10 | |||
11 | function register2 ({ registerHook, peertubeHelpers }: RegisterClientOptions) { | ||
12 | registerHook({ | ||
13 | target: 'action:admin-plugin-settings.init', | ||
14 | handler: ({ npmName }: { npmName: string }) => { | ||
15 | if ('peertube-plugin-transcription' !== npmName) { | ||
16 | return | ||
17 | } | ||
18 | }, | ||
19 | }) | ||
20 | |||
21 | registerHook({ | ||
22 | target: 'action:video-watch.video.loaded', | ||
23 | handler: ({ video }: { video: Video }) => { | ||
24 | fetch(`${peertubeHelpers.getBaseRouterRoute()}/videos/${video.uuid}/captions`, { | ||
25 | method: 'PUT', | ||
26 | headers: peertubeHelpers.getAuthHeader(), | ||
27 | }) | ||
28 | .then((res) => res.json()) | ||
29 | .then((data) => console.log('Hi %s.', data)) | ||
30 | }, | ||
31 | }) | ||
32 | } | ||