From 84d66d85faf0c106072fcb701ebed4551c3d15eb Mon Sep 17 00:00:00 2001 From: weibaohui Date: Mon, 11 Sep 2017 15:13:24 +0800 Subject: [PATCH] Correct spelling Correct spelling --- src/common/api/base.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/api/base.go b/src/common/api/base.go index 255bd0ff8..e381a3bb3 100644 --- a/src/common/api/base.go +++ b/src/common/api/base.go @@ -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()