aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/server/plugin.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/server/plugin.ts')
-rw-r--r--server/models/server/plugin.ts6
1 files changed, 4 insertions, 2 deletions
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<PluginModel> {
142 count: number, 142 count: number,
143 sort: string 143 sort: string
144 }) { 144 }) {
145 const { uninstalled = false } = options
145 const query: FindAndCountOptions = { 146 const query: FindAndCountOptions = {
146 offset: options.start, 147 offset: options.start,
147 limit: options.count, 148 limit: options.count,
148 order: getSort(options.sort), 149 order: getSort(options.sort),
149 where: {} 150 where: {
151 uninstalled
152 }
150 } 153 }
151 154
152 if (options.type) query.where['type'] = options.type 155 if (options.type) query.where['type'] = options.type
153 if (options.uninstalled) query.where['uninstalled'] = options.uninstalled
154 156
155 return PluginModel 157 return PluginModel
156 .findAndCountAll(query) 158 .findAndCountAll(query)