@@ -210,13 +210,13 @@ def osf_data
210210 end
211211
212212 def osf_delete
213- @document = get_single_doc_via_search ( 1 , { :q => "id:#{ params [ :id ] } " } )
213+ @document = get_single_doc_via_search ( 1 , q : "id:#{ params [ :id ] } " )
214214 authorize! :show , @document
215215 document = ShareNotify ::PushDocument . new ( "http://library.ucsd.edu/dc/collection/#{ params [ :id ] } " , osf_date ( @document ) )
216216 document . title = osf_title ( @document )
217217 document . delete
218218 share_upload ( document )
219- redirect_to dams_collection_path ( params [ :id ] ) , notice : " Your record has been deleted from OSF Share."
219+ redirect_to dams_collection_path ( params [ :id ] ) , notice : ' Your record has been deleted from OSF Share.'
220220 end
221221
222222 def osf_push
@@ -227,7 +227,7 @@ def osf_push
227227 osf_contributors ( @document ) . each do |contributor |
228228 document . add_contributor ( contributor )
229229 end
230-
230+
231231 if document . valid?
232232 share_upload ( document )
233233 redirect_to dams_collection_path ( params [ :id ] ) , notice : "Your record has been pushed to OSF Share."
@@ -241,10 +241,10 @@ def share_upload(document)
241241 @headers = {
242242 'Authorization' => "Bearer #{ share_config . fetch ( 'token' ) } " ,
243243 'Content-Type' => 'application/vnd.api+json'
244- }
245- @route = "#{ share_config . fetch ( 'host' ) } api/v2/normalizeddata/"
244+ }
245+ @route = "#{ share_config . fetch ( 'host' ) } api/v2/normalizeddata/"
246246 @body = ShareNotify ::Graph . new ( document ) . to_share_v2 . to_json
247- @response = with_timeout { HTTParty . post ( @route , body : @body , headers : @headers ) }
247+ @response = with_timeout { HTTParty . post ( @route , body : @body , headers : @headers ) }
248248 end
249249
250250 def share_config
0 commit comments