Commit Graph

19 Commits

Author SHA1 Message Date
Maximilian
34acd0fa8d Remove old session query 2023-04-07 21:27:14 -05:00
Maximilian
71d3bd77d0 Add ability to get session given an AuthToken, fix GetCurrentUser() 2023-04-07 21:23:46 -05:00
max
8e4c5e3268 Fix wrong query for clearing 6-hour old sessions 2023-04-06 09:35:53 -05:00
max
58328fe505 Fix some SQL errors 2023-04-06 09:30:53 -05:00
max
5f7e674d32 Add remember me functionality, handle both types of sessions appropriately 2023-04-06 08:56:48 -05:00
max
ec9c1a8fb5 Initial clear old sessions implementation 2023-04-04 14:37:36 -05:00
Maximilian
b1c65f2ab1 Remove erroneous SetCookie (leftover from redundant remove) 2023-03-27 15:05:11 -05:00
max
965139ea18 Remove redundant session cookie clear 2023-03-16 08:40:50 -05:00
Maximilian
eff740072d Decouple SQL queries from logic 2023-03-05 15:46:43 -06:00
Maximilian
75d8996cf9 Fix some queries, comments, and error logging 2023-02-28 15:02:21 -06:00
Maximilian
ac2b5262fd Remove print 2023-02-28 14:57:15 -06:00
Maximilian
b9ac6fbd5f Add session migration 2023-02-28 14:55:09 -06:00
Maximilian
baa8eb2b93 Move to a session based system for AuthTokens 2023-02-28 14:54:55 -06:00
Maximilian
89d1b96400 Change CreatedAt and UpdatedAt to type Time and update migrations.go accordingly 2023-02-17 18:55:27 -06:00
max
f2a7336283 Fix user queries and a logical error in GetCurrentUser 2023-02-14 09:43:02 -06:00
Maximilian
fcd6477ec3 Migration implementation, auto migrate when starting program 2023-02-13 23:41:45 -06:00
Maximilian
eb1c2daa6a Add AuthToken to user struct, and update SQL statements to match struct fields 2023-02-13 23:30:12 -06:00
Maximilian
edccb95be3 Remove unnecessary assignment 2023-02-08 19:47:08 -06:00
Maximilian
9e4216301d Move models to its own package 2023-02-08 19:39:53 -06:00