fix db query
[arvados.git] / app / controllers / orvos / v1 / metadata_controller.rb
index b7916d84d2623b63dea9814645de87353a49ab4d..b5ca6004cdd378a08014615b06829f11e09ac6eb 100644 (file)
@@ -1,2 +1,11 @@
-class MetadataController < ApplicationController
+class Orvos::V1::MetadataController < ApplicationController
+  def index
+    if params[:tail_kind] and params[:tail]
+      params[:where] = JSON.parse(params[:where]) if params[:where].is_a?(String)
+      params[:where] ||= {}
+      params[:where][:tail_kind] = params[:tail_kind]
+      params[:where][:tail] = params[:tail]
+    end
+    super
+  end
 end