MM-11863 Add KVList method (#9467)
* Add KVList method * Add KVList method Add KVList method * Add pagination support * Change offset, limit to page, perPage * Rename constant
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
7468f35cb0
Коммит
8c03e584c1
@@ -59,3 +59,14 @@ func (a *App) DeletePluginKey(pluginId string, key string) *model.AppError {
|
||||
|
||||
return result.Err
|
||||
}
|
||||
|
||||
func (a *App) ListPluginKeys(pluginId string, page, perPage int) ([]string, *model.AppError) {
|
||||
result := <-a.Srv.Store.Plugin().List(pluginId, page, perPage)
|
||||
|
||||
if result.Err != nil {
|
||||
mlog.Error(result.Err.Error())
|
||||
return nil, result.Err
|
||||
}
|
||||
|
||||
return result.Data.([]string), nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user