Add tables back to DbStructure

This commit is contained in:
calebmer
2015-11-11 10:32:19 -05:00
parent 16af8fc61e
commit 0374d4e651
3 changed files with 26 additions and 3 deletions
+2 -1
View File
@@ -147,7 +147,7 @@ app db conf reqBody req =
-- select * from public.proc(a := "foo"::undefined) where whereT limit limitT
([], _) -> do
body <- encode <$> tables (cs schema)
body <- encode <$> accessibleTables (filter ((== cs schema) . tableSchema) allTabs)
return $ responseLBS status200 [jsonH] $ cs body
([table], "OPTIONS") -> do
@@ -160,6 +160,7 @@ app db conf reqBody req =
return $ responseLBS status404 [] ""
where
allTabs = tables db
allRels = relations db
allCols = columns db
allPrKeys = primaryKeys db