1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-26 14:46:24 -07:00
Commit graph

315 commits

Author SHA1 Message Date
Eggbertx
35860a8a6d Implement file fingerprint, filename, and checksum banning via filter conditions 2024-08-17 16:26:11 -07:00
Eggbertx
83bc642674 Update init SQL files and schema diagram now that the wordfilter table is no longer necessary 2024-08-12 12:31:12 -07:00
Eggbertx
4802c837fb Clean up duplicate code in filters 2024-08-11 18:59:59 -07:00
Eggbertx
8d072de374 Fix wordfilter enabling, disabling, and editing 2024-08-11 16:29:38 -07:00
Eggbertx
74716d19d4 Replace board dirs text input box with checkboxes 2024-08-11 15:48:41 -07:00
Eggbertx
d40e561287 Start migrating wordfilter struct and usage 2024-08-11 13:59:58 -07:00
Eggbertx
bf8fc7a7ba Exclude wordfilters from regular filter queries (still included when getting a single filter) 2024-08-11 10:47:39 -07:00
Eggbertx
cc4b7c64fb Simplify where clause adding for active filter 2024-08-11 08:55:28 -07:00
Eggbertx
506dd0db42 Add getting filters by board dir 2024-08-11 01:00:05 -07:00
Eggbertx
fa56d500b8 Add filter enabling/disabling 2024-08-11 00:40:45 -07:00
Eggbertx
e3a4efd9c0 Add function to get all filters, add IsActive filter property 2024-08-11 00:08:57 -07:00
Eggbertx
d2b44f0e12 Add filter method for getting its associated board IDs 2024-08-10 22:21:05 -07:00
Eggbertx
9c3e0c9a7b Remove not all that necessary struct (table is only used as a relation between a filter and boards) 2024-08-10 22:20:11 -07:00
Eggbertx
32c11ed337 Add filter structs and some functions for them 2024-08-10 21:55:58 -07:00
Eggbertx
e12b2fb982 Add migration stuff for filter tables 2024-08-10 20:01:33 -07:00
Eggbertx
9fe6df52ee Add public function to gcsql for SQL mock access 2024-05-31 14:43:35 -07:00
Eggbertx
8be391ba5c Add timeouts to ban and board SQL operations 2024-05-31 11:37:09 -07:00
Eggbertx
f5e7084263 Add timeouts to board SQL operations 2024-05-30 13:51:31 -07:00
Eggbertx
519c27b200 Add context to reports, use transactions for audit tables 2024-05-30 13:34:13 -07:00
Eggbertx
be77ec64f9 Add SQL timeout wrapper functions 2024-05-30 13:16:13 -07:00
Eggbertx
b2b58213e2 Add timeouts to staff account db operations 2024-05-30 11:54:53 -07:00
Eggbertx
98eb2c4429 Add configuration setting for staff session time, use context/timeout for session creation 2024-05-30 11:39:24 -07:00
Eggbertx
64724001a1 Use contexts with timeout for appeals and wordfilters 2024-05-30 11:09:24 -07:00
Eggbertx
f72435ec8d Fix error log being written to even if there were no errors 2024-05-29 12:13:20 -07:00
Eggbertx
4613bea216 Fix bad connection error caused by prematurely closed statement 2024-05-24 16:54:40 -07:00
Eggbertx
1032042472 Fix changes suggested by sqlclosecheck 2024-05-24 16:10:07 -07:00
Eggbertx
27a0142864 Replace nil with background context in tests 2024-05-24 14:20:41 -07:00
Eggbertx
692602402c replace hacky interfaceSlice function in gcsql with []any{...} 2024-05-24 14:19:50 -07:00
Eggbertx
48fc697f8e Use timeout+context in getting all boards and goroutine in building multiple boards 2024-05-24 14:02:13 -07:00
Eggbertx
b334cda25d use timeout saved in gcdb struct instead of checking config 2024-05-24 13:59:14 -07:00
Eggbertx
8b9d7bf7aa Add database optimization for Postgres and SQLite 2024-05-23 21:27:14 -07:00
Eggbertx
caea5ee77e Add tests for QueryRowContextSQL 2024-05-04 18:22:30 -07:00
Eggbertx
0055756555 Test preparation timeout 2024-05-04 17:18:47 -07:00
Eggbertx
124683f037 Add context usage for querying and executing SQL 2024-05-04 16:50:44 -07:00
Eggbertx
b26146f301 refactor usage of SystemCriticalConfig to SQLConfig where appropriate 2024-05-04 15:31:08 -07:00
Eggbertx
a725dd6b86 Add BeginContextTx 2024-05-04 14:45:06 -07:00
Eggbertx
e4c088babf Apply configured default SQL timeout 2024-05-01 17:36:13 -07:00
Eggbertx
bece29d440 Refactor connection function signatures to use config.SQLConfig, start adding context usage to gcsql 2024-05-01 17:32:19 -07:00
Eggbertx
e446f2a5d7 Add tests for banpage.html template 2024-04-02 11:33:13 -07:00
Eggbertx
e1650ab3e3 Add public function for creating sqlmock-based tests in other packages 2024-04-01 11:27:41 -07:00
Eggbertx
dc454d1bc1 Move some test utility functions to testutil 2024-03-30 22:07:38 -07:00
Eggbertx
45ba890280 Refactor gcsql tests to clean them up a bit 2024-03-30 17:25:19 -07:00
Eggbertx
521296ed29 Add test for ApproveAppeal 2024-03-30 16:25:37 -07:00
Eggbertx
bcfa5f4269 Add GetAppeals tests 2024-03-30 13:29:02 -07:00
Eggbertx
cf19943008 remove testdata dir from gcsql as it's no longer needed (using sqlmock now) 2024-03-30 12:09:17 -07:00
Eggbertx
ab1606b035 Add provisioning tests for Postgres and SQLite3 2024-03-30 12:02:15 -07:00
Eggbertx
beca22cbf6 start breaking up long mock query lines 2024-03-29 16:52:56 -07:00
Eggbertx
1ef35975dc Add basic test for buildNewDatabase("mysql") 2024-03-29 16:44:41 -07:00
Eggbertx
84aa7978be Handle error returned by setupDBConn 2024-03-29 09:51:23 -07:00
Eggbertx
1417695dcc Add sqlmock tests 2024-03-28 23:04:22 -07:00