db: Refactor switch; NFC

Cette révision appartient à :
Daan Sprenkels 2020-07-27 18:47:37 +02:00
Parent a8eba1b0df
révision 104dbab335
1 fichiers modifiés avec 1 ajouts et 5 suppressions

Voir le fichier

@ -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