Sandro CURY CAZZANIGA Kharec
Kharec pushed to main at Kharec/goyco 2025-11-23 14:49:02 +01:00
458e25cf79 fix: modify compression middleware to pass through redirects immediately without buffering
d4595d8dbf fix: properly encoding the flash message in the redirect URL
Compare 2 commits »
Kharec pushed to main at Kharec/goyco 2025-11-23 14:26:55 +01:00
c5418f4e4c docs: update swagger
db0369225e refactor: update references to VoteRequest
07ac965b3d refactor: use consistent naming (VoteRequest -> CastVoteRequest)
Compare 3 commits »
Kharec pushed to main at Kharec/goyco 2025-11-23 14:23:02 +01:00
e2e5d42035 feat: add SetValidatedDTOInContext to support test helper functions
6e4b41894f fix: update test cases to use createCreatePostRequests
0a8ed2e27c fix: add explicite validation check for empty url, title and content length
216e8657f6 feat: add generic createRequestWithDTO along with helpers functions
fb7206c0a2 fix: test context handling
Compare 6 commits »
Kharec pushed to main at Kharec/goyco 2025-11-23 13:47:40 +01:00
964785e494 docs: update swagger
9c67cd2a47 feat: update vote handler to use dto VoteRequest and update MountRoutes
8b5cc8e939 feat: add VoteRequest with its validation types
Compare 3 commits »
Kharec pushed to main at Kharec/goyco 2025-11-23 13:43:48 +01:00
0e71b28615 feat: update CreateUser to use dto.RegisterRequest and update MountRoutes to apply validation middleware
cd740da57a feat: update methods to use validated DTOs and update MountRoutes
abe4a3dc88 feat: update handlers to use GetValidatedDTO instead of manual decoding and update MountRoutes to wrap handlers with WithValidation for all DTO-based routes
Compare 3 commits »
Kharec pushed to main at Kharec/goyco 2025-11-23 13:41:57 +01:00
738243d945 feat: add ValidationMiddleware to RouteModuleConfig
4fbdfb6e4a feat: add two helpers function to retrieve validated DTOs from request context and to apply validation middleware
6bb3a78b88 feat: Add ValidationMiddleware to router configuration
Compare 3 commits »
Kharec pushed to main at Kharec/goyco 2025-11-23 13:35:02 +01:00
54e37e59fc docs: update swagger
5d4b38ddc4 feat: add validation tags to request DTOs
Compare 2 commits »
Kharec pushed to main at Kharec/goyco 2025-11-23 13:17:17 +01:00
7dc119ecde docs: update swagger
Kharec pushed to main at Kharec/goyco 2025-11-23 13:16:47 +01:00
52c9f4a02b feat: add internal/dto to swagger directories
Kharec pushed to main at Kharec/goyco 2025-11-23 13:14:44 +01:00
be91a135bc clean: empty line
2d7ff9778b feat: update swagger comments following dtos relocation
4ff3fd3583 refactor: remove UpdatePostRequest definition and update swagger comments
73121cad15 refactor: remove all request DTO, update swagger comments and update token related methods to use dto ones
c5bf1b2fd8 feat: locate post-related request DTOs
Compare 6 commits »
Kharec pushed to main at Kharec/m2h 2025-11-23 11:36:11 +01:00
cee5bc89fa docs: update requirements in readme
Kharec pushed to main at Kharec/m2h 2025-11-23 11:35:00 +01:00
c43f718495 feat: use Getopt::Long to handle command line options
Kharec pushed to main at Kharec/goyco 2025-11-23 10:44:31 +01:00
80fb37371f update: fix go version and update alpine to 3.22
Kharec pushed to main at Kharec/goyco 2025-11-21 17:07:32 +01:00
fea49fad8d fix: add missing method to mock
Kharec pushed to main at Kharec/goyco 2025-11-21 17:06:07 +01:00
4b04461ebb style: minor formatting adjustments
533e8c3d46 feat: add GetByUsernamePrefixFn field and method to UserRepositoryStub
df568291f1 feat: add GetByUsernamePrefix implementation to MockUserRepository
81acce62b1 feat: add GetByUsernamePrefix method to interface and add implementation
989a61e7d5 feat: use getByUsernamePrefix to optimize findExistingSeedUser()
Compare 6 commits »
Kharec pushed to main at Kharec/goyco 2025-11-21 16:56:30 +01:00
62d466e4fa refactor: use go generics
Kharec pushed to main at Kharec/goyco 2025-11-21 16:53:49 +01:00
0cd428d5d9 feat: use connection pooling instead of a single connection
Kharec pushed to main at Kharec/goyco 2025-11-21 16:50:26 +01:00
5c239ad61d feat: add missing GetVoteCountsByPostID method to the errorVoteRepository test mock
Kharec pushed to main at Kharec/goyco 2025-11-21 16:48:50 +01:00
01f2b1fe75 feat: remove loop and use GetVoteCountsByPostID
28134c101c feat: add GetVoteCountsByPostID to the mock for testing
2f78370d43 feat: GetVoteCountsByPostID: use a single sql query to returns up votes and down votes counts
Compare 3 commits »
Kharec pushed to main at Kharec/goyco 2025-11-21 16:43:49 +01:00
39598a166d feat: remove redundat getbyemail call to reduce db query by 2 (1Q/user creation instead of 2)