Added completed user. Some fixes and more more more...
This commit is contained in:
parent
b96dd39795
commit
ea8ab7c0ed
33 changed files with 576 additions and 212 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue