Added completed user. Some fixes and more more more...

This commit is contained in:
KamilM1205 2026-01-02 22:56:25 +04:00
parent b96dd39795
commit ea8ab7c0ed
33 changed files with 576 additions and 212 deletions

View file

@ -40,6 +40,8 @@ func CreatePostController(service *services.PostService, userService *services.U
// @Failure 400 {object} responses.ErrorResponse
// @Failure 500 {object} responses.ErrorResponse
// @Router /post [post]
//
// @Security BasicAuth
func (r *PostController) Post(c *gin.Context) {
var request requests.CreatePostRequest
@ -227,6 +229,8 @@ func (r *PostController) GetById(c *gin.Context) {
// @Failure 404 {object} responses.ErrorResponse
// @Failure 500 {object} responses.ErrorResponse
// @Router /post/{id} [put]
//
// @Security BasicAuth
func (r *PostController) Put(c *gin.Context) {
var request requests.PutPostRequest
@ -276,6 +280,8 @@ func (r *PostController) Put(c *gin.Context) {
// @Failure 404 {object} responses.ErrorResponse
// @Failure 500 {object} responses.ErrorResponse
// @Router /post/{id} [delete]
//
// @Security BasicAuth
func (r *PostController) Delete(c *gin.Context) {
id := c.Param("id")
id_valid, err := uuid.Parse(id)