Correct spelling

Correct spelling
This commit is contained in:
weibaohui 2017-09-11 15:13:24 +08:00 committed by GitHub
parent d21795cf53
commit 84d66d85fa

View File

@ -195,9 +195,9 @@ func (b *BaseAPI) GetUserIDForRequest() (int, bool, bool) {
// Redirect does redirection to resource URI with http header status code.
func (b *BaseAPI) Redirect(statusCode int, resouceID string) {
requestURI := b.Ctx.Request.RequestURI
resoucreURI := requestURI + "/" + resouceID
resourceURI := requestURI + "/" + resouceID
b.Ctx.Redirect(statusCode, resoucreURI)
b.Ctx.Redirect(statusCode, resourceURI)
}
// GetIDFromURL checks the ID in request URL
@ -221,7 +221,7 @@ func (b *BaseAPI) SetPaginationHeader(total, page, pageSize int64) {
link := ""
// SetPaginationHeader setprevious link
// SetPaginationHeader set previous link
if page > 1 && (page-1)*pageSize <= total {
u := *(b.Ctx.Request.URL)
q := u.Query()
@ -233,7 +233,7 @@ func (b *BaseAPI) SetPaginationHeader(total, page, pageSize int64) {
link += fmt.Sprintf("<%s>; rel=\"prev\"", u.String())
}
// SetPaginationHeader setnext link
// SetPaginationHeader set next link
if pageSize*page < total {
u := *(b.Ctx.Request.URL)
q := u.Query()