db: Refactor switch; NFC

This commit is contained in:
Daan Sprenkels 2020-07-27 18:47:37 +02:00
부모 a8eba1b0df
커밋 104dbab335
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제

파일 보기

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