add godotenv, regenerate swagger docs

This commit is contained in:
zardzul
2026-03-13 22:23:42 +01:00
parent 82e1b51d38
commit 873cd6a57d
12 changed files with 71 additions and 48 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ func NewArtistHandler(repo repository.ArtistRepository) *ArtistHandler {
// @Produce json
// @Success 200 {array} map[string]interface{}
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/artists [get]
// @Router /artists [get]
func (handler *ArtistHandler) GetAll(c *gin.Context) {
artists, err := handler.repo.GetAll(c.Request.Context())
if err != nil {
+2 -2
View File
@@ -51,7 +51,7 @@ type ErrorResponse struct {
// @Success 201 {object} CreateUserResponse
// @Failure 400 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/users/create [post]
// @Router /users/create [post]
func (h *UserHandler) CreateUser(c *gin.Context) {
var req CreateUserRequest
if err := c.ShouldBindJSON(&req); err != nil {
@@ -90,7 +90,7 @@ func (h *UserHandler) CreateUser(c *gin.Context) {
// @Success 200 {object} UsernameResponse
// @Failure 400 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/users/{id} [get]
// @Router /users/{id} [get]
func (h *UserHandler) GetUsernameByID(c *gin.Context) {
idParam := c.Param("id")
var pgID pgtype.UUID