noshutdown-ru / vault

Is a plugin for project management system Redmine. Allows you to store various passwords/keys in one place for the project.
https://noshutdown.ru/en/redmine-plugins-vault
46 stars 29 forks source link

Need making json export format like redmine standart #90

Open lightinen opened 2 years ago

lightinen commented 2 years ago

Now keys.json like an numeric array of data like:

[{"id":,"project_id":,"name":"","body":"","login":"","file":null,"url":"","comment":"","whitelist":""}]

But redmine standart json API like

{"keys":[{"id":,"project_id":,"name":"","body":"","login":"","file":null,"url":"","comment":"","whitelist":""}]}

Because of this difference you may have a trouble with extending external libraries, working with redmine rest api

Fixing (vault/app/controllers/keys_controller.rb: line 72):

- format.json { render json: @keys }
+ format.json { render json: { :keys => @keys }}