diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-08 14:02:03 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 2c0539420d77339e6afe8d7920b44af4c0dcb1e6 (patch) | |
tree | 6728a1cec7e2688a42cc84466a8c978067f2c574 /server/models | |
parent | f023a19c3eeeea2b014b47fae522a62eab320048 (diff) | |
download | PeerTube-2c0539420d77339e6afe8d7920b44af4c0dcb1e6.tar.gz PeerTube-2c0539420d77339e6afe8d7920b44af4c0dcb1e6.tar.zst PeerTube-2c0539420d77339e6afe8d7920b44af4c0dcb1e6.zip |
WIP plugins: static files
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/server/plugin.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/models/server/plugin.ts b/server/models/server/plugin.ts index 1fbfd208f..b3b8276df 100644 --- a/server/models/server/plugin.ts +++ b/server/models/server/plugin.ts | |||
@@ -75,6 +75,16 @@ export class PluginModel extends Model<PluginModel> { | |||
75 | return PluginModel.findAll(query) | 75 | return PluginModel.findAll(query) |
76 | } | 76 | } |
77 | 77 | ||
78 | static load (pluginName: string) { | ||
79 | const query = { | ||
80 | where: { | ||
81 | name: pluginName | ||
82 | } | ||
83 | } | ||
84 | |||
85 | return PluginModel.findOne(query) | ||
86 | } | ||
87 | |||
78 | static uninstall (pluginName: string) { | 88 | static uninstall (pluginName: string) { |
79 | const query = { | 89 | const query = { |
80 | where: { | 90 | where: { |