From 8d2be0ed7bb87283a1ec98609df6b82d83db706a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 11 Jul 2019 17:23:24 +0200 Subject: WIP plugins: move plugin CLI in peertube script Install/uninstall/list plugins remotely --- server/models/server/plugin.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/models') diff --git a/server/models/server/plugin.ts b/server/models/server/plugin.ts index 60abaec65..226c08342 100644 --- a/server/models/server/plugin.ts +++ b/server/models/server/plugin.ts @@ -142,15 +142,17 @@ export class PluginModel extends Model { count: number, sort: string }) { + const { uninstalled = false } = options const query: FindAndCountOptions = { offset: options.start, limit: options.count, order: getSort(options.sort), - where: {} + where: { + uninstalled + } } if (options.type) query.where['type'] = options.type - if (options.uninstalled) query.where['uninstalled'] = options.uninstalled return PluginModel .findAndCountAll(query) -- cgit v1.2.3