diff options
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-four')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test-four/main.js | 27 | ||||
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test-four/package.json | 20 |
2 files changed, 47 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test-four/main.js b/server/tests/fixtures/peertube-plugin-test-four/main.js new file mode 100644 index 000000000..9abb73646 --- /dev/null +++ b/server/tests/fixtures/peertube-plugin-test-four/main.js | |||
@@ -0,0 +1,27 @@ | |||
1 | async function register ({ | ||
2 | peertubeHelpers | ||
3 | }) { | ||
4 | peertubeHelpers.logger.info('Hello world from plugin four') | ||
5 | |||
6 | const username = 'root' | ||
7 | const results = await peertubeHelpers.database.query( | ||
8 | 'SELECT "email" from "user" WHERE "username" = $username', | ||
9 | { | ||
10 | type: 'SELECT', | ||
11 | bind: { username } | ||
12 | } | ||
13 | ) | ||
14 | |||
15 | peertubeHelpers.logger.info('root email is ' + results[0]['email']) | ||
16 | } | ||
17 | |||
18 | async function unregister () { | ||
19 | return | ||
20 | } | ||
21 | |||
22 | module.exports = { | ||
23 | register, | ||
24 | unregister | ||
25 | } | ||
26 | |||
27 | // ########################################################################### | ||
diff --git a/server/tests/fixtures/peertube-plugin-test-four/package.json b/server/tests/fixtures/peertube-plugin-test-four/package.json new file mode 100644 index 000000000..dda3c7f37 --- /dev/null +++ b/server/tests/fixtures/peertube-plugin-test-four/package.json | |||
@@ -0,0 +1,20 @@ | |||
1 | { | ||
2 | "name": "peertube-plugin-test-four", | ||
3 | "version": "0.0.1", | ||
4 | "description": "Plugin test 4", | ||
5 | "engine": { | ||
6 | "peertube": ">=1.3.0" | ||
7 | }, | ||
8 | "keywords": [ | ||
9 | "peertube", | ||
10 | "plugin" | ||
11 | ], | ||
12 | "homepage": "https://github.com/Chocobozzz/PeerTube", | ||
13 | "author": "Chocobozzz", | ||
14 | "bugs": "https://github.com/Chocobozzz/PeerTube/issues", | ||
15 | "library": "./main.js", | ||
16 | "staticDirs": {}, | ||
17 | "css": [], | ||
18 | "clientScripts": [], | ||
19 | "translations": {} | ||
20 | } | ||