Commit Graph

69 Commits

Author SHA1 Message Date
a6b170eca3 Throw 400s for invalid input 2022-04-09 15:35:24 -04:00
cc622dbdf1 Use string 'spam' as true boolean for readability 2022-04-09 15:16:11 -04:00
bfb9102d51 Don't need validation unless it's a POST (probably should re-think this whole route) 2022-04-09 00:54:58 -04:00
c0070041b7 Fix the named route for page (/view) 2022-04-09 00:52:16 -04:00
ad75cd76ec Fix redirect path 2022-04-09 00:33:26 -04:00
d27945b2b3 Use unique <meta> tags for single message view; change status to 404 if page is not found 2022-04-08 14:17:23 -04:00
121ed5ab52 Small style tweaks 2022-04-08 13:10:52 -04:00
94dfa4043e Small tweaks I've been meaning to make 2022-04-08 12:59:15 -04:00
5583b9f608 Consolidate /view and /spam base paths 2022-04-07 23:04:09 -04:00
36d1fcd7fa Use restrictive placeholder in addition to optional for page number 2022-04-07 22:14:24 -04:00
07e7f69e90 Fix <nav> hyperlink; implement placeholder for /spam too 2022-04-07 21:13:50 -04:00
8f95b616cf Implement /view route w/ page_number placeholder 2022-04-07 21:04:41 -04:00
f2ca5cc1b6 Implement get_post_by_id() and the message_id view 2022-04-04 22:56:45 -04:00
1809a765f2 Implement the /message/:id route 2022-04-04 21:21:11 -04:00
80b2acb79a expires vs expiration
It appears I have misunderstood the difference between `expires =>
time() + 3600` and `expiration => 3600` as I thought `expires` would
just set the expiration one time and not update for subsequent
requests. Per this discussion thread, that does not appear to be
correct:

https://github.com/mojolicious/mojo/discussions/1833

Thus I felt it best to just set the expiry period to 30 min and allow
that to reset on subsequent requests rather than reinvent the wheel
2022-04-04 17:22:23 -04:00
a36e43ea11 Whoopsie... Remember to run your unit tests before comitting, folks 2022-04-04 14:02:05 -04:00
fe739e7f2b I should've been using 'expires' for the session rather than 'expiration' 2022-04-04 13:48:31 -04:00
29bf6f71e2 Lower session lifetime cuz visitor counter 2022-04-04 00:04:09 -04:00
dfb27d3815 Boop 2022-04-03 23:35:59 -04:00
27ec34b208 Make the visitor counter increment when a new session is created 2022-04-03 21:34:22 -04:00
3532310738 Display the visitor counter 2022-04-03 21:04:09 -04:00
6fe9a59b6d Some style tweaks, this was buggin me 2022-04-03 17:11:02 -04:00
54aa04d04c Add helper for the new model 2022-02-09 21:17:49 -05:00
c26f034a3d Set session to 1 day 2022-02-09 19:33:47 -05:00
02355ee08b Implement /spam route 2022-01-12 15:18:34 -05:00
02b087a38e Fix post count 2022-01-11 20:15:53 -05:00
53f292ac7c Implement post count 2022-01-11 19:51:45 -05:00
681ed961e8 Just specify Postgres connection string in conf file 2022-01-10 14:18:49 -05:00
361c4d432a Explicit return for the redirect in the /sign route 2022-01-10 13:44:30 -05:00
Daniel Bowling
770cc23884 Getting things ready to deploy 2022-01-10 12:53:10 -05:00
d7c0f715d2 More tests 2022-01-08 22:01:51 -05:00
e4aad2ccbd Validate input 2022-01-08 21:21:22 -05:00
1d91bd3677 Don't need this 2022-01-04 23:32:47 -05:00
2af783940a Increase message size and use wrapping for message dispaly 2022-01-04 22:05:51 -05:00
13e89cdfa1 Fix CAPTCHA and flash error for spam 2022-01-02 17:53:43 -05:00
837304d565 Set session expiration 2022-01-02 02:45:27 -05:00
da91154df7 Set default value for message_date column 2022-01-02 02:30:10 -05:00
baca0cd515 Filter URLs out of message body 2022-01-02 02:01:45 -05:00
26aa2ba19f Implement is_spam column 2022-01-02 01:31:33 -05:00
2845fd7499 Initial flash error implementation 2022-01-01 23:37:41 -05:00
b639cb180d Style makeover 2022-01-01 21:39:04 -05:00
d9b114f9ea Back-end stuff to get the URL field working 2021-12-31 23:45:21 -05:00
fb8cc6427e Don't require name to post 2021-12-31 23:05:34 -05:00
6f06c1292d Revert back to table name 'messages' for now 2021-12-31 22:49:45 -05:00
f50bcce74e Make CAPTCHA more random 2021-12-31 22:32:39 -05:00
d7613d8b04 Rename table 2021-12-30 21:39:16 -05:00
9a9a8e2cc1 Initial AssetPack setup 2021-12-22 23:18:35 -05:00
fbd569a3c2 Implement limited query 2021-12-22 22:23:10 -05:00
07353e7d7e SQL style clean-up 2021-12-19 19:09:16 -05:00
b7bb80cbe0 Increase message body limit 2021-12-19 18:31:41 -05:00