aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test-four/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-four/main.js')
-rw-r--r--server/tests/fixtures/peertube-plugin-test-four/main.js27
1 files changed, 27 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 @@
1async 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
18async function unregister () {
19 return
20}
21
22module.exports = {
23 register,
24 unregister
25}
26
27// ###########################################################################