Getting the database back to life (dodgy, will probably revert)

This commit is contained in:
Simon Brooke 2020-09-20 14:24:57 +01:00
parent 20d6c9bd9a
commit a805f3ccc5
No known key found for this signature in database
GPG key ID: A7A4F18D1D4DF987
6 changed files with 7 additions and 5 deletions

View file

@ -187,5 +187,4 @@ Copyright © 2016 Simon Brooke for the Radical Independence Campaign.
Licensed under the GNU General Public License, version 2.0 or (at your option) any later version. Licensed under the GNU General Public License, version 2.0 or (at your option) any later version.
**NOTE THAT** files which are directly created by the Luminus template do not currently have a GPL header **NOTE THAT** files which are directly created by the Luminus template do not currently have a GPL header
at the top; files which are new in this project or which have been substantially modified for this project at the top; files which are new in this project or which have been substantially modified for this project should have a GPL header at the top.
do have a GPL header at the top.

View file

@ -30,6 +30,6 @@
(.bind "java:comp/env/jdbc/testdb" (.bind "java:comp/env/jdbc/testdb"
(doto (org.postgresql.ds.PGSimpleDataSource.) (doto (org.postgresql.ds.PGSimpleDataSource.)
(.setServerName "localhost") (.setServerName "localhost")
(.setDatabaseName "youyesyet_dev") (.setDatabaseName "loriner") ;; "youyesyet_dev")
(.setUser "youyesyet") (.setUser "youyesyet")
(.setPassword "thisisnotsecure")))) (.setPassword "thisisnotsecure"))))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B

View file

@ -22,7 +22,8 @@
"Primary connection to the main database. TODO: this does not yet enable "Primary connection to the main database. TODO: this does not yet enable
sharding." sharding."
:start (conman/connect! {:jdbc-url-env (env :database-url) :start (conman/connect! {:jdbc-url-env (env :database-url)
:jdbc-url "jdbc:postgresql://127.0.0.1/youyesyet_dev?user=youyesyet&password=thisisnotsecure" ;; :jdbc-url "jdbc:postgresql://127.0.0.1/youyesyet_dev?user=youyesyet&password=thisisnotsecure"
:jdbc-url "jdbc:postgresql://127.0.0.1/loriner?user=youyesyet&password=thisisnotsecure"
:driver-class-name "org.postgresql.Driver"}) :driver-class-name "org.postgresql.Driver"})
:stop (conman/disconnect! *db*)) :stop (conman/disconnect! *db*))

View file

@ -2,6 +2,7 @@
youyesyet.middleware youyesyet.middleware
(:require [clojure.tools.logging :as log] (:require [clojure.tools.logging :as log]
[ring.middleware.anti-forgery :refer [wrap-anti-forgery]] [ring.middleware.anti-forgery :refer [wrap-anti-forgery]]
[ring.middleware.content-type :refer [wrap-content-type]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]] [ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[ring.middleware.format :refer [wrap-restful-format]] [ring.middleware.format :refer [wrap-restful-format]]
[ring.middleware.webjars :refer [wrap-webjars]] [ring.middleware.webjars :refer [wrap-webjars]]
@ -83,5 +84,6 @@
(assoc-in [:security :anti-forgery] false) (assoc-in [:security :anti-forgery] false)
(assoc-in [:session :store] (ttl-memory-store (* 60 30))))) (assoc-in [:session :store] (ttl-memory-store (* 60 30)))))
wrap-context wrap-context
wrap-content-type
wrap-internal-error)) wrap-internal-error))

View file

@ -112,7 +112,7 @@
:redirect-to redirect-to :redirect-to redirect-to
:warnings ["Your user name was not recognised or your password did not match"]}) :warnings ["Your user name was not recognised or your password did not match"]})
;; if we've no username, just invite the user to log in ;; if we've no username, just invite the user to log in
true :else
(layout/render (layout/render
"login.html" "login.html"
{:title "Please log in" {:title "Please log in"