fix: linter run
All checks were successful
Backend ci / build (pull_request) Successful in 3m57s

This commit is contained in:
d3m0k1d
2026-02-15 16:37:55 +03:00
parent 7f8d8373a9
commit 78623924ef
3 changed files with 10 additions and 6 deletions

View File

@@ -31,7 +31,7 @@ func NewPostHandlers(repo repositories.PostRepository) *PostHandlers {
// @Failure 400 {object} models.ErrorResponse "Invalid ID format"
// @Router /posts [get]
func (h *PostHandlers) GetPosts(c *gin.Context) {
result := []storage.PostReq{}
var result []storage.PostReq
result, err := h.repo.GetAll(c.Request.Context())
if err != nil {
h.logger.Error("error request: " + err.Error())
@@ -206,7 +206,7 @@ func (h *PostHandlers) DeletePost(c *gin.Context) {
// @Failure 400 {object} models.ErrorResponse "Invalid ID format"
// @Router /admin/posts [get]
func (h *PostHandlers) AdminGetAll(c *gin.Context) {
result := []storage.PostReq{}
var result []storage.PostReq
result, err := h.repo.GetAllAdmin(c.Request.Context())
if err != nil {
h.logger.Error("error request: " + err.Error())