Browse Source

Bugfix, frames no longer worked when opening index page

Manuel Gall 2 years ago
parent
commit
ed275a50a8
1 changed files with 4 additions and 1 deletions
  1. 4 1
      frames

+ 4 - 1
frames

@@ -36,10 +36,13 @@ end
 class GetAllConfigs < Riddl::Implementation
   def response  
     Dir.chdir( __dir__  + '/data')
-    Riddl::Parameter::Complex.new('list','application/json',JSON::pretty_generate(Dir.glob('*/').sort_by{|x| x.downcase}))
+    databack = JSON::pretty_generate(Dir.glob('*/').sort_by{|x| x.downcase});
+    Dir.chdir( __dir__)
+    Riddl::Parameter::Complex.new('list','application/json',databack)
   end
 end
 
+
 class Get < Riddl::Implementation
   def response
     if @r[0] == 'test'