add /blogs/{blogID} and /blogs/lookup/{blogName} routes
This commit is contained in:
parent
dfc116d828
commit
dd72a1f4c1
5 changed files with 104 additions and 1 deletions
|
@ -126,7 +126,10 @@ const (
|
|||
ErrMissingScope = 1002
|
||||
|
||||
// Account related
|
||||
ErrAccountNotFound = 1003
|
||||
ErrAccountNotFound = 2001
|
||||
|
||||
// Blog related
|
||||
ErrBlogNotFound = 3001
|
||||
)
|
||||
|
||||
func ErrCodeMessage(code int) string {
|
||||
|
@ -145,6 +148,8 @@ var errCodeMessages = map[int]string{
|
|||
ErrMissingScope: "Token is missing required scope for this endpoint",
|
||||
|
||||
ErrAccountNotFound: "Account not found",
|
||||
|
||||
ErrBlogNotFound: "Blog not found",
|
||||
}
|
||||
|
||||
func ErrCodeStatus(code int) int {
|
||||
|
@ -163,4 +168,6 @@ var errCodeStatuses = map[int]int{
|
|||
ErrMissingScope: http.StatusForbidden,
|
||||
|
||||
ErrAccountNotFound: http.StatusNotFound,
|
||||
|
||||
ErrBlogNotFound: http.StatusNotFound,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue