db: Refactor switch; NFC

Este commit está contenido en:
Daan Sprenkels 2020-07-27 18:47:37 +02:00
padre a8eba1b0df
commit 104dbab335
Se han modificado 1 ficheros con 1 adiciones y 5 borrados

Ver fichero

@ -73,11 +73,7 @@ func ErrHTTPStatusCode(err error) int {
switch err {
case nil:
return 0
case ErrKeyInvalidChar:
return http.StatusNotFound
case ErrKeyInvalidLength:
return http.StatusNotFound
case ErrPasteDoesNotExist:
case ErrKeyInvalidChar, ErrKeyInvalidLength, ErrPasteDoesNotExist:
return http.StatusNotFound
}
return http.StatusInternalServerError