Added authorization

This commit is contained in:
KamilM1205 2025-09-25 09:01:00 +04:00
parent c3c3d65d32
commit b96dd39795
50 changed files with 685 additions and 410 deletions

View file

@ -16,6 +16,8 @@ func HandleError(err error) responses.ErrorResponse {
if errors.Is(&ie.ValidationError{}, err) {
errorCode = http.StatusBadRequest
} else if errors.Is(&ie.ReadFileError{}, err) {
errorCode = http.StatusInternalServerError
} else if errors.Is(&ie.NotFoundError{}, err) {
errorCode = http.StatusNotFound
} else if errors.Is(&ie.AlreadyExistsError{}, err) {