Kharec
|
785faeb60c
|
feat: update alpine to 3.23
|
2025-12-04 10:01:19 +01:00 |
|
Kharec
|
0623c027ba
|
docs: prepare CONTRIBUTING.md
|
2025-12-03 20:57:32 +01:00 |
|
Kharec
|
d4e91b6034
|
refactor: complete refactor and better helpers use
|
2025-11-29 15:19:41 +01:00 |
|
Kharec
|
7d46d3e81b
|
clean: remove the unused expectedValue in assertHeader (always set to "")
|
2025-11-29 15:19:28 +01:00 |
|
Kharec
|
216aaf3117
|
refactor: clean code and use new request helpers
|
2025-11-29 14:58:52 +01:00 |
|
Kharec
|
435047ad0c
|
refactor: clean code
|
2025-11-29 14:58:37 +01:00 |
|
Kharec
|
b7ee8bd11d
|
refactor: clean variable names and use new request helpers
|
2025-11-29 14:58:20 +01:00 |
|
Kharec
|
040cd48be8
|
refactor: clean variables
|
2025-11-29 14:58:07 +01:00 |
|
Kharec
|
2dd16e0e00
|
refactor: complete
|
2025-11-29 14:56:18 +01:00 |
|
Kharec
|
d6db70cc79
|
refactor: clean code and variables, use new request helpers
|
2025-11-29 14:55:47 +01:00 |
|
Kharec
|
58e10ade7d
|
refactor: clean variable names and modernize code
|
2025-11-29 14:50:35 +01:00 |
|
Kharec
|
7403a75d8e
|
refactor: clean variable naming
|
2025-11-29 14:46:26 +01:00 |
|
Kharec
|
b429bc11af
|
refactor: clean code and use new request helpers
|
2025-11-29 14:41:38 +01:00 |
|
Kharec
|
2ec5c28fb5
|
refactor: rename variables and clean code
|
2025-11-29 14:37:18 +01:00 |
|
Kharec
|
3743a99e40
|
refactor: req -> request, rec -> recorder, reqBody -> requestBody...
|
2025-11-29 14:21:07 +01:00 |
|
Kharec
|
5710921b87
|
refactor: use new request helpers
|
2025-11-29 14:17:25 +01:00 |
|
Kharec
|
84d9c81484
|
refactor: rec -> recorder, req -> request and modernize loop
|
2025-11-29 14:15:07 +01:00 |
|
Kharec
|
b0c2038927
|
feat: add new helpers to make requests properly in integration tests
|
2025-11-29 14:11:32 +01:00 |
|
Kharec
|
fd88931146
|
refactor: variable names and modernize loop
|
2025-11-25 14:37:59 +01:00 |
|
Kharec
|
6ce0f4dfad
|
refactor: name variables
|
2025-11-25 10:13:10 +01:00 |
|
Kharec
|
68e3dceefc
|
refactor: name variables
|
2025-11-25 10:08:48 +01:00 |
|
Kharec
|
cded14c526
|
fix: force correct mime types for static files after modifying compression middleware's buffering
|
2025-11-24 07:53:08 +01:00 |
|
Kharec
|
cfca668ca6
|
docs: clean readme
|
2025-11-23 21:56:53 +01:00 |
|
Kharec
|
279255b587
|
fix: don't let rate limiting fails the test
|
2025-11-23 21:48:11 +01:00 |
|
Kharec
|
b83f8c2228
|
fix: update ValidationMiddleware to return a JSON error response when JSON decoding fails
|
2025-11-23 21:42:27 +01:00 |
|
Kharec
|
aabc48128c
|
fix: use router in handlers integration tests (for dto validation)
|
2025-11-23 15:10:55 +01:00 |
|
Kharec
|
68716b977b
|
fix: verify XSS sanitization in handler response instead of repository stub
|
2025-11-23 15:01:54 +01:00 |
|
Kharec
|
dbe1600632
|
fix: indentation
|
2025-11-23 14:49:31 +01:00 |
|
Kharec
|
458e25cf79
|
fix: modify compression middleware to pass through redirects immediately without buffering
|
2025-11-23 14:48:59 +01:00 |
|
Kharec
|
d4595d8dbf
|
fix: properly encoding the flash message in the redirect URL
|
2025-11-23 14:48:39 +01:00 |
|
Kharec
|
c5418f4e4c
|
docs: update swagger
|
2025-11-23 14:26:52 +01:00 |
|
Kharec
|
db0369225e
|
refactor: update references to VoteRequest
|
2025-11-23 14:26:45 +01:00 |
|
Kharec
|
07ac965b3d
|
refactor: use consistent naming (VoteRequest -> CastVoteRequest)
|
2025-11-23 14:26:19 +01:00 |
|
Kharec
|
e2e5d42035
|
feat: add SetValidatedDTOInContext to support test helper functions
|
2025-11-23 14:22:59 +01:00 |
|
Kharec
|
6e4b41894f
|
fix: update test cases to use createCreatePostRequests
|
2025-11-23 14:22:35 +01:00 |
|
Kharec
|
0a8ed2e27c
|
fix: add explicite validation check for empty url, title and content length
|
2025-11-23 14:21:30 +01:00 |
|
Kharec
|
216e8657f6
|
feat: add generic createRequestWithDTO along with helpers functions
|
2025-11-23 14:20:59 +01:00 |
|
Kharec
|
fb7206c0a2
|
fix: test context handling
|
2025-11-23 14:20:09 +01:00 |
|
Kharec
|
c25926514b
|
fix: add explicit empty-field validation check in handlers
|
2025-11-23 14:19:54 +01:00 |
|
Kharec
|
964785e494
|
docs: update swagger
|
2025-11-23 13:47:38 +01:00 |
|
Kharec
|
9c67cd2a47
|
feat: update vote handler to use dto VoteRequest and update MountRoutes
|
2025-11-23 13:47:31 +01:00 |
|
Kharec
|
8b5cc8e939
|
feat: add VoteRequest with its validation types
|
2025-11-23 13:46:51 +01:00 |
|
Kharec
|
0e71b28615
|
feat: update CreateUser to use dto.RegisterRequest and update MountRoutes to apply validation middleware
|
2025-11-23 13:43:47 +01:00 |
|
Kharec
|
cd740da57a
|
feat: update methods to use validated DTOs and update MountRoutes
|
2025-11-23 13:43:14 +01:00 |
|
Kharec
|
abe4a3dc88
|
feat: update handlers to use GetValidatedDTO instead of manual decoding and update MountRoutes to wrap handlers with WithValidation for all DTO-based routes
|
2025-11-23 13:42:52 +01:00 |
|
Kharec
|
738243d945
|
feat: add ValidationMiddleware to RouteModuleConfig
|
2025-11-23 13:41:55 +01:00 |
|
Kharec
|
4fbdfb6e4a
|
feat: add two helpers function to retrieve validated DTOs from request context and to apply validation middleware
|
2025-11-23 13:41:07 +01:00 |
|
Kharec
|
6bb3a78b88
|
feat: Add ValidationMiddleware to router configuration
|
2025-11-23 13:40:31 +01:00 |
|
Kharec
|
54e37e59fc
|
docs: update swagger
|
2025-11-23 13:35:00 +01:00 |
|
Kharec
|
5d4b38ddc4
|
feat: add validation tags to request DTOs
|
2025-11-23 13:34:53 +01:00 |
|
Kharec
|
7dc119ecde
|
docs: update swagger
|
2025-11-23 13:17:14 +01:00 |
|
Kharec
|
52c9f4a02b
|
feat: add internal/dto to swagger directories
|
2025-11-23 13:16:44 +01:00 |
|
Kharec
|
be91a135bc
|
clean: empty line
|
2025-11-23 13:14:41 +01:00 |
|
Kharec
|
2d7ff9778b
|
feat: update swagger comments following dtos relocation
|
2025-11-23 13:14:07 +01:00 |
|
Kharec
|
4ff3fd3583
|
refactor: remove UpdatePostRequest definition and update swagger comments
|
2025-11-23 13:13:53 +01:00 |
|
Kharec
|
73121cad15
|
refactor: remove all request DTO, update swagger comments and update token related methods to use dto ones
|
2025-11-23 13:13:23 +01:00 |
|
Kharec
|
c5bf1b2fd8
|
feat: locate post-related request DTOs
|
2025-11-23 13:12:36 +01:00 |
|
Kharec
|
eedebe60d1
|
feat: locate auth-related request DTOs
|
2025-11-23 13:12:10 +01:00 |
|
Kharec
|
80fb37371f
|
update: fix go version and update alpine to 3.22
|
2025-11-23 10:44:28 +01:00 |
|
Kharec
|
fea49fad8d
|
fix: add missing method to mock
|
2025-11-21 17:07:26 +01:00 |
|
Kharec
|
4b04461ebb
|
style: minor formatting adjustments
|
2025-11-21 17:06:04 +01:00 |
|
Kharec
|
533e8c3d46
|
feat: add GetByUsernamePrefixFn field and method to UserRepositoryStub
|
2025-11-21 17:05:48 +01:00 |
|
Kharec
|
df568291f1
|
feat: add GetByUsernamePrefix implementation to MockUserRepository
|
2025-11-21 17:05:31 +01:00 |
|
Kharec
|
81acce62b1
|
feat: add GetByUsernamePrefix method to interface and add implementation
|
2025-11-21 17:05:01 +01:00 |
|
Kharec
|
989a61e7d5
|
feat: use getByUsernamePrefix to optimize findExistingSeedUser()
|
2025-11-21 17:04:35 +01:00 |
|
Kharec
|
3ffd83b0fb
|
feat: ignore docs in make format
|
2025-11-21 17:02:06 +01:00 |
|
Kharec
|
62d466e4fa
|
refactor: use go generics
|
2025-11-21 16:56:26 +01:00 |
|
Kharec
|
0cd428d5d9
|
feat: use connection pooling instead of a single connection
|
2025-11-21 16:53:46 +01:00 |
|
Kharec
|
5c239ad61d
|
feat: add missing GetVoteCountsByPostID method to the errorVoteRepository test mock
|
2025-11-21 16:50:23 +01:00 |
|
Kharec
|
01f2b1fe75
|
feat: remove loop and use GetVoteCountsByPostID
|
2025-11-21 16:48:48 +01:00 |
|
Kharec
|
28134c101c
|
feat: add GetVoteCountsByPostID to the mock for testing
|
2025-11-21 16:48:15 +01:00 |
|
Kharec
|
2f78370d43
|
feat: GetVoteCountsByPostID: use a single sql query to returns up votes and down votes counts
|
2025-11-21 16:47:52 +01:00 |
|
Kharec
|
39598a166d
|
feat: remove redundat getbyemail call to reduce db query by 2 (1Q/user creation instead of 2)
|
2025-11-21 16:43:46 +01:00 |
|
Kharec
|
fa9474d863
|
revert: db transaction use, avoiding the pgx RETURNING issue while maintaining data consistency
|
2025-11-21 16:31:06 +01:00 |
|
Kharec
|
34a97994b3
|
feat: improve testing to use production code paths and better coverage
|
2025-11-21 16:26:21 +01:00 |
|
Kharec
|
eb5f93ffd0
|
clean: remove duplicate sequential helpers
|
2025-11-21 16:25:27 +01:00 |
|
Kharec
|
697f201d60
|
feat: use database transactions to ensure atomicity
|
2025-11-21 16:21:04 +01:00 |
|
Kharec
|
f4ab8bda45
|
feat: transaction rollback test
|
2025-11-21 16:20:41 +01:00 |
|
Kharec
|
65576cc623
|
feat: keep seeding fast and predictable even when parallelized
|
2025-11-21 16:16:35 +01:00 |
|
Kharec
|
a5b4e9bf25
|
feat: update tests to pass precomputed hashes
|
2025-11-21 16:11:42 +01:00 |
|
Kharec
|
c020517ccf
|
feat: reduce hashing cost by removing redundant password hashing
|
2025-11-21 16:11:33 +01:00 |
|
Kharec
|
4cdda3f944
|
feat: remove bcrypt and use a precompute hash
|
2025-11-21 16:11:08 +01:00 |
|
Kharec
|
ff471cd5dd
|
fix: loop
|
2025-11-21 15:39:08 +01:00 |
|
Kharec
|
df5e67c7f3
|
feat: add idempotency tests
|
2025-11-21 15:34:08 +01:00 |
|
Kharec
|
b2580d2380
|
feat: make seeding idempotente
|
2025-11-21 15:33:59 +01:00 |
|
Kharec
|
4749213bf0
|
feat: update test to accept randomized seed user identities
|
2025-11-21 15:26:29 +01:00 |
|
Kharec
|
6470425b96
|
feat: avoid unique constraint failures on repeat runs by randomizing seed identities
|
2025-11-21 15:26:05 +01:00 |
|
Kharec
|
14ae6f815b
|
feat: update tests to verify clamping
|
2025-11-21 15:21:05 +01:00 |
|
Kharec
|
73083e4188
|
feat: check zero/negative value in seeding
|
2025-11-21 15:20:57 +01:00 |
|
Kharec
|
c907c4812b
|
feat: add tests covering negative values for the three flags
|
2025-11-21 14:56:09 +01:00 |
|
Kharec
|
c7f30070c0
|
feat: reject negative/nonsensical flag values with a clear error instead of letting slice/channel allocations panic
|
2025-11-21 14:55:51 +01:00 |
|
Kharec
|
0dcd5fec51
|
fix: Makefile fuzz target to enumerate fuzz functions per package and run each individually
|
2025-11-21 14:30:37 +01:00 |
|
Kharec
|
96c054aa99
|
feat: add new parameter
|
2025-11-21 13:13:27 +01:00 |
|
Kharec
|
bdd7766275
|
docs: update readme
|
2025-11-21 13:13:18 +01:00 |
|
Kharec
|
0b1241d371
|
docs: update readme
|
2025-11-21 13:11:47 +01:00 |
|
Kharec
|
b300fc2f5e
|
feat: new test for json output flag from config
|
2025-11-21 13:11:43 +01:00 |
|
Kharec
|
f49bea4138
|
feat(config): read a flag in .env to set or not json output
|
2025-11-21 13:11:16 +01:00 |
|
Kharec
|
79e072fe6b
|
feat(cli): read .env value to set or not the json output
|
2025-11-21 13:10:53 +01:00 |
|
Kharec
|
7fca1f78dc
|
feat(cli): add a json output and tests
|
2025-11-21 13:00:03 +01:00 |
|
Kharec
|
30a2e88685
|
docs: update readme
|
2025-11-20 18:55:08 +01:00 |
|