Commit graph

112 commits

Author SHA1 Message Date
Joe Ardent
09a07f2c57 more test skeletons 2023-06-03 12:36:18 -07:00
Joe Ardent
bad698cc19 add skeleton for signup tests 2023-06-03 10:42:23 -07:00
Joe Ardent
0f0d7f488f Add more test utils. 2023-06-03 10:11:07 -07:00
Joe Ardent
14fade1832 Merge branch 'tests' 2023-06-02 17:35:52 -07:00
Joe Ardent
81d35e1661 Fix broken test and move helpers to test util module. 2023-06-02 17:32:48 -07:00
Joe Ardent
30169733a0 More login testing, added reference user factory fn. 2023-06-02 17:01:59 -07:00
Joe Ardent
613814a648 Merge branch 'tests' 2023-06-02 15:34:04 -07:00
Joe Ardent
569b19e837 Minor tweaks. 2023-06-02 14:15:13 -07:00
Joe Ardent
659bc0d008 Add tests for login/logout endpoints.
Changes in the test DB setup are there to support persistent in-memory DBs for testing.
2023-06-02 14:12:29 -07:00
Joe Ardent
81adffe7f0 fix migration test with hack
Without sleeping after migration, the tests fail, so...
2023-06-01 12:24:43 -07:00
Joe Ardent
b691e6ee8d add automatic migration on startup 2023-05-31 21:47:59 -07:00
Joe Ardent
453a126b95 Add generic handlers tests, remove broken doctests for session store. 2023-05-31 15:58:03 -07:00
Joe Ardent
bfda5a6fbb Merge branch 'main' into tests 2023-05-31 13:58:38 -07:00
Joe Ardent
352a85eaef Move router creation to lib to allow easier testing. 2023-05-31 13:15:33 -07:00
Joe Ardent
8c666c3f78 only update last_seen every 12 hours 2023-05-31 12:43:57 -07:00
Joe Ardent
ac0af7970d No actual tests added. 2023-05-30 18:46:32 -07:00
Joe Ardent
57a6b69ec3 tidy up db stuff 2023-05-30 18:44:25 -07:00
Joe Ardent
6425dd4016 Add middleware to update last_seen. 2023-05-30 14:51:52 -07:00
Joe Ardent
5dcd726df1 move all db stuff to db mod. 2023-05-29 17:17:23 -07:00
Joe Ardent
ba9205c9f2 add license 2023-05-29 16:01:53 -07:00
Joe Ardent
d2613b0ef9 End-to-end web-based signup, login, and logout flows work. 2023-05-29 14:25:50 -07:00
Joe Ardent
113982ba27 Merge branch 'login' 2023-05-29 11:13:32 -07:00
Joe Ardent
5de4b9994c stub out logout 2023-05-29 11:13:12 -07:00
Joe Ardent
dbff72330e Adds working login route. 2023-05-28 17:55:16 -07:00
Joe Ardent
559e277d9e fix deps 2023-05-28 17:06:09 -07:00
Joe Ardent
0f0a7583cd Move login stuff to own module. 2023-05-28 13:44:50 -07:00
Joe Ardent
e5d66769dc rename modules for users 2023-05-28 13:31:45 -07:00
Joe Ardent
41a7abbe13 go back to uuids for users 2023-05-28 12:58:26 -07:00
Joe Ardent
b1fd57c486 checkpoint working skeleton for login 2023-05-28 12:20:55 -07:00
Joe Ardent
151719daf1 update sqlx to actual latest version 2023-05-27 22:55:00 -07:00
Joe Ardent
60862a5d6a minor tidy 2023-05-24 17:08:40 -07:00
Joe Ardent
0d6c9932d6 Add SqliteSessionStore module.
Stolen with very minor mods from https://github.com/jbr/async-sqlx-session
2023-05-24 16:39:13 -07:00
Joe Ardent
8237715066 simplify uuid/db handling 2023-05-22 17:18:13 -07:00
Joe Ardent
f50abaa4a6 re-org some handlers, handle '/'. 2023-05-22 16:57:08 -07:00
Joe Ardent
a615119afc Adds "working" signup and success page, from front-end branch. 2023-05-22 15:09:42 -07:00
Joe Ardent
06d7b4a514 Fixed redirect on success, removed DbUser struct. 2023-05-22 15:08:14 -07:00
Joe Ardent
b7eb56e0e7 redirects weirdly 2023-05-19 17:17:24 -07:00
Joe Ardent
ebfc759fa6 Add redirect response to signup success. 2023-05-19 15:13:49 -07:00
Joe Ardent
fee7fff3df better signup pages 2023-05-18 15:49:33 -07:00
Joe Ardent
79ecd74500 more cleanup 2023-05-18 12:24:43 -07:00
Joe Ardent
46232b4254 minor cleanup 2023-05-18 12:15:37 -07:00
Joe Ardent
091ddbf48a Working user signup, looks ugly.
Still no login or sessions, though.
2023-05-18 10:05:29 -07:00
Joe Ardent
94f1b35c03 adding html templates 2023-05-17 13:40:06 -07:00
Joe Ardent
f12b524457 filling out templates for account creation 2023-05-17 10:09:00 -07:00
Joe Ardent
d9c56aaf1e rename error 2023-05-16 16:24:24 -07:00
Joe Ardent
93deaff565 add username validation (length only) 2023-05-16 12:24:53 -07:00
Joe Ardent
da5eefa73a add check for uniqueness violation in account creation 2023-05-16 11:55:32 -07:00
Joe Ardent
95762f341b checkpoint fucking with errors 2023-05-14 20:33:36 -07:00
Joe Ardent
d87ade7980 add user structs 2023-05-12 15:36:19 -07:00
Joe Ardent
0223242473 move user stuff to module 2023-05-12 14:24:57 -07:00