db: Refactor switch; NFC

这个提交包含在:
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