2019-07-02 22:03:23 +02:00
|
|
|
package api
|
|
|
|
|
|
|
|
import (
|
2020-01-23 10:10:32 +01:00
|
|
|
"net/http"
|
|
|
|
|
2019-07-02 22:03:23 +02:00
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"github.com/photoprism/photoprism/internal/config"
|
2020-01-12 14:00:56 +01:00
|
|
|
"github.com/photoprism/photoprism/pkg/txt"
|
2019-07-02 22:03:23 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2020-01-30 09:51:23 +01:00
|
|
|
ErrUnauthorized = gin.H{"code": http.StatusUnauthorized, "error": txt.UcFirst(config.ErrUnauthorized.Error())}
|
|
|
|
ErrReadOnly = gin.H{"code": http.StatusForbidden, "error": txt.UcFirst(config.ErrReadOnly.Error())}
|
|
|
|
ErrUploadNSFW = gin.H{"code": http.StatusForbidden, "error": txt.UcFirst(config.ErrUploadNSFW.Error())}
|
|
|
|
ErrAlbumNotFound = gin.H{"code": http.StatusNotFound, "error": "Album not found"}
|
|
|
|
ErrPhotoNotFound = gin.H{"code": http.StatusNotFound, "error": "Photo not found"}
|
2020-02-02 02:00:47 +01:00
|
|
|
ErrLabelNotFound = gin.H{"code": http.StatusNotFound, "error": "Label not found"}
|
2020-01-30 09:51:23 +01:00
|
|
|
ErrUnexpectedError = gin.H{"code": http.StatusInternalServerError, "error": "Unexpected error"}
|
2019-07-02 22:03:23 +02:00
|
|
|
)
|