From 6d03803a5c3ba8cfb528404a86a80b18cf885eaf Mon Sep 17 00:00:00 2001 From: Alexander Olofsson <alexander.olofsson@liu.se> Date: Thu, 5 Dec 2019 14:30:09 +0100 Subject: [PATCH] Modify sub-resource-lists too --- lib/passwordstate/resources/folder.rb | 3 ++- lib/passwordstate/resources/password.rb | 3 ++- lib/passwordstate/resources/password_list.rb | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/passwordstate/resources/folder.rb b/lib/passwordstate/resources/folder.rb index 07b5189..1fe3c01 100644 --- a/lib/passwordstate/resources/folder.rb +++ b/lib/passwordstate/resources/folder.rb @@ -16,7 +16,8 @@ module Passwordstate alias title folder_name def password_lists - Passwordstate::ResourceList.new client, Passwordstate::Resources::PasswordList, + Passwordstate::ResourceList.new Passwordstate::Resources::PasswordList, + client: client, search_query: { tree_path: tree_path }, all_path: 'searchpasswordlists', all_query: { tree_path: tree_path }, diff --git a/lib/passwordstate/resources/password.rb b/lib/passwordstate/resources/password.rb index 3984a2f..5c51cd0 100644 --- a/lib/passwordstate/resources/password.rb +++ b/lib/passwordstate/resources/password.rb @@ -58,7 +58,8 @@ module Passwordstate def history raise 'Password history only available on stored passwords' unless stored? - Passwordstate::ResourceList.new client, PasswordHistory, + Passwordstate::ResourceList.new PasswordHistory, + client: client, all_path: "passwordhistory/#{password_id}", only: :all end diff --git a/lib/passwordstate/resources/password_list.rb b/lib/passwordstate/resources/password_list.rb index 1ddc120..9c880f9 100644 --- a/lib/passwordstate/resources/password_list.rb +++ b/lib/passwordstate/resources/password_list.rb @@ -45,7 +45,8 @@ module Passwordstate end def passwords - Passwordstate::ResourceList.new client, Passwordstate::Resources::Password, + Passwordstate::ResourceList.new Passwordstate::Resources::Password, + client: client, all_path: "passwords/#{password_list_id}", all_query: { query_all: nil }, search_path: "searchpasswords/#{password_list_id}", -- GitLab