Well, actually... Let's hardcode guestbook owner. :)
This commit is contained in:
parent
a3525418f1
commit
33cd1dc3b8
@ -24,7 +24,7 @@ var (
|
||||
showVersion = flag.Bool("v", false, "show version")
|
||||
listenAddress = flag.String("listen", "/var/run/dwelling-home/sock", "listen address (ip:port|unix_path)")
|
||||
captchaExpiry = flag.Duration("captcha-expiry", 10*time.Minute, "CAPTCHA expiry (e.g. 5m, 60s)")
|
||||
guestbookOwner = flag.String("guestbook-owner", "Admin", "name of a guestbook owner")
|
||||
guestbookOwner = "Arav"
|
||||
guestbookPageSize = flag.Int64("guestbook-page-size", 60, "size of a guestbook page")
|
||||
databasesPath = flag.String("database-path", "/var/lib/dwelling-home", "path to a directory where to store DB files")
|
||||
)
|
||||
@ -51,7 +51,7 @@ func main() {
|
||||
}
|
||||
defer mindflowDB.Close()
|
||||
|
||||
hand := dwhttp.NewHandlers(*captchaExpiry, *guestbookOwner, *guestbookPageSize, guestbookDB, mindflowDB)
|
||||
hand := dwhttp.NewHandlers(*captchaExpiry, guestbookOwner, *guestbookPageSize, guestbookDB, mindflowDB)
|
||||
|
||||
r := httpr.New()
|
||||
|
||||
@ -82,7 +82,7 @@ func main() {
|
||||
s.Handler(http.MethodPost, "/:id", captchaApi.Solve)
|
||||
s.Handler(http.MethodGet, "/:id/image", captchaApi.Image)
|
||||
|
||||
guestbookApi := dwhttp.NewGuestbookApiHandlers(*guestbookOwner, *guestbookPageSize, guestbookDB)
|
||||
guestbookApi := dwhttp.NewGuestbookApiHandlers(guestbookOwner, *guestbookPageSize, guestbookDB)
|
||||
|
||||
s = r.Sub("/api/guestbook")
|
||||
s.Handler(http.MethodPost, "/", guestbookApi.New)
|
||||
|
@ -8,7 +8,7 @@ Restart=on-failure
|
||||
DynamicUser=yes
|
||||
ExecStart=/usr/bin/dwelling-home -listen /var/run/dwelling-home/sock \
|
||||
-database-path /var/lib/dwelling-home -captcha-expiry 10m \
|
||||
-guestbook-owner Arav -guestbook-page-size 60
|
||||
-guestbook-page-size 60
|
||||
|
||||
ReadOnlyPaths=/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user