Files
d3m0k1d.ru/backend/internal/handlers/post_handlers.go
d3m0k1d 440b836d54
All checks were successful
Backend ci / build (push) Successful in 7m15s
chore: add docs to swagger and add pass handlers
2026-02-03 19:26:49 +03:00

69 lines
1.4 KiB
Go

package handlers
import (
"gitea.d3m0k1d.ru/d3m0k1d/d3m0k1d.ru/backend/internal/logger"
"github.com/gin-gonic/gin"
)
var log = logger.New(false)
// GetPosts godoc
// @Summary Get all posts
// @Description Get all posts
// @Tags posts
// @Accept json
// @Produce json
// @Success 200 {object} []storage.Post
// @Router /api/v1/posts [get]
func GetPosts(c *gin.Context) {
log.Info("GetPosts")
}
// GetPost godoc
// @Summary Get post by id
// @Description Get post by id
// @Tags posts
// @Accept json
// @Produce json
// @Success 200 {object} storage.Post
// @Router /api/v1/posts/{id} [get]
func GetPost(c *gin.Context) {
log.Info("GetPost")
}
// CreatePost godoc
// @Summary Create post
// @Description Create post
// @Tags posts
// @Accept json
// @Produce json
// @Success 200 {object} storage.Post
// @Router /api/v1/posts [post]
func CreatePost(c *gin.Context) {
log.Info("CreatePost")
}
// UpdatePost godoc
// @Summary Update post
// @Description Update post
// @Tags posts
// @Accept json
// @Produce json
// @Success 200 {object} storage.Post
// @Router /api/v1/posts/{id} [put]
func UpdatePost(c *gin.Context) {
log.Info("UpdatePost")
}
// DeletePost godoc
// @Summary Delete post
// @Description Delete post
// @Tags posts
// @Accept json
// @Produce json
// @Success 200 {object} storage.Post
// @Router /api/v1/posts/{id} [delete]
func DeletePost(c *gin.Context) {
log.Info("DeletePost")
}