Skip to content

Commit

Permalink
Fix route generation
Browse files Browse the repository at this point in the history
  • Loading branch information
swlkr committed May 2, 2020
1 parent 42216d3 commit c918798
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/joy/cli/routes.janet
Expand Up @@ -36,7 +36,6 @@

(helper/with-file [f (path/join sys-path "joy" "cli" "routes.txt")]
(let [template (file/read f :all)]
(db/with-transaction
(let [columns (->> (db/query `select pti.name as col
from sqlite_master
join pragma_table_info(sqlite_master.name) pti on sqlite_master.name != pti.name
Expand Down Expand Up @@ -74,9 +73,7 @@
(string/replace-all "%show-td-elements%" show-td-elements)
(string/replace-all "%form-elements%" (form-elements (helper/singular table-name) not-sys-columns))
(string/replace-all "%form-destructured-keys%" (form-destructured-keys not-sys-columns))
(string/replace-all "%singular-name%" (helper/singular table-name)))))))

(db/disconnect)))
(string/replace-all "%singular-name%" (helper/singular table-name))))))))


(defn route-def [table-name]
Expand Down

0 comments on commit c918798

Please sign in to comment.