OSDN Git Service

add: short cut
[pettanr/pettanr.git] / app / controllers / folders_controller.rb
index c27442a..f535d7a 100644 (file)
@@ -29,7 +29,20 @@ class FoldersController < ApplicationController
   end
   
   def index
-    filer_list
+    if params['path']  # secret api
+      list = Folder.where(['name = ?', params['path']])
+      respond_to do |format|
+        format.json {
+          res = {
+            :page_status => {:type => :unlimited},
+            :list => list
+          }
+          render json: res.to_json
+        }
+      end
+    else
+      filer_list
+    end
   end
   
   def children_html_format format