cvvvvv/internal/delivery/http/v1/resume.go

24 lines
464 B
Go

package v1
import (
"net/http"
"git.roboces.dev/catalin/cvvvvv/internal/domain"
"github.com/gin-gonic/gin"
)
type ResumeResponse struct {
Resume domain.Resume `json:"resume"`
}
func (h *Handler) getResume(ctx *gin.Context) {
_, err := h.VerifyAuthentication(ctx)
if err != nil {
newResponse(ctx, http.StatusUnauthorized, "Api key not provided or invalid")
return
}
ctx.JSON(http.StatusOK, ResumeResponse{
Resume: h.services.Resumes.Get(),
})
}