refactor: declaring controller methods externally because the big idiot swaggo does not want to work unless the comments are attached to a gin handler func;

fix: swagger docs work now;
chore: remove incomplete account and profile controllers;
fix: correct client info type in request middleware
This commit is contained in:
2025-07-17 22:37:07 +03:00
parent d6e2d02bff
commit f2753e1495
9 changed files with 1456 additions and 395 deletions

View File

@@ -103,10 +103,10 @@ func GetRequest[ModelT any](c *gin.Context) (*dto.Request[ModelT], error) {
gin.H{"error": "Client info was not found"})
panic("No client_info found in gin context. Does the handler use AuthMiddleware?")
}
cinfo := cinfoFromCtx.(*dto.ClientInfo)
cinfo := cinfoFromCtx.(dto.ClientInfo)
return &dto.Request[ModelT]{
Body: body,
User: *cinfo,
User: cinfo,
}, nil
}