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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user