Add core bar-db module.

This commit is contained in:
Dominik Pantůček 2025-04-09 09:26:24 +02:00
parent 148a4ece7f
commit 03c094214b
3 changed files with 58 additions and 11 deletions

View file

@ -32,8 +32,8 @@
intarweb
uri-common
(chicken string)
postgresql
api-servlets)
api-servlets
bar-db)
(define -port- (make-parameter #f))
(define -certificate- (make-parameter #f))
@ -101,13 +101,7 @@
(when (and (-user-) (-group-))
(switch-user/group (-user-) (-group-)))
(define dbconn
(connect
`((dbname . ,(-db-name-))
(host . ,(-db-host-))
(user . ,(-db-user-))
(password . ,(-db-pass-)))))
(print dbconn)
(bar-db-init! (-db-name-) (-db-host-) (-db-user-) (-db-pass-))
(define (handle-api-calls)
(define plst (cdr (uri-path (request-uri (current-request)))))