diff options
author | Chocobozzz <me@florianbigard.com> | 2020-05-04 09:44:00 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-04 16:21:39 +0200 |
commit | 97b65ce58aaacbbfec2291f18fb95a9da9eb5263 (patch) | |
tree | 98779224aabe3f5c5eefbcde46b0a50ae48e761c /server/tests/fixtures/peertube-plugin-test-six/main.js | |
parent | 15b4bcdf04db86c655ae16d4832ae2a8f0e55829 (diff) | |
download | PeerTube-97b65ce58aaacbbfec2291f18fb95a9da9eb5263.tar.gz PeerTube-97b65ce58aaacbbfec2291f18fb95a9da9eb5263.tar.zst PeerTube-97b65ce58aaacbbfec2291f18fb95a9da9eb5263.zip |
Fix plugin storeData
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-six/main.js')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test-six/main.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test-six/main.js b/server/tests/fixtures/peertube-plugin-test-six/main.js new file mode 100644 index 000000000..bb9aaffa7 --- /dev/null +++ b/server/tests/fixtures/peertube-plugin-test-six/main.js | |||
@@ -0,0 +1,25 @@ | |||
1 | async function register ({ | ||
2 | storageManager, | ||
3 | peertubeHelpers | ||
4 | }) { | ||
5 | const { logger } = peertubeHelpers | ||
6 | |||
7 | { | ||
8 | await storageManager.storeData('superkey', { value: 'toto' }) | ||
9 | await storageManager.storeData('anotherkey', { value: 'toto2' }) | ||
10 | |||
11 | const result = await storageManager.getData('superkey') | ||
12 | logger.info('superkey stored value is %s', result.value) | ||
13 | } | ||
14 | } | ||
15 | |||
16 | async function unregister () { | ||
17 | return | ||
18 | } | ||
19 | |||
20 | module.exports = { | ||
21 | register, | ||
22 | unregister | ||
23 | } | ||
24 | |||
25 | // ########################################################################### | ||