Skip to content

Commit

Permalink
apache#79 modify
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoYL123 committed Feb 27, 2020
1 parent 1ecd068 commit 42cd6ec
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pkg/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const (
QueryParamRev = "revision"
QueryParamMatch = "match"
QueryParamKeyID = "kv_id"
QueryLimit = "limit"
QueryOffset = "offset"
QueryPageNum = "pageNum"
QueryPageSize = "pageSize"
)

//http headers
Expand Down
12 changes: 6 additions & 6 deletions server/resource/v1/doc_struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ var (
ParamType: goRestful.QueryParameterKind,
Desc: "label pairs,for example &label=service:order&label=version:1.0.0",
}
DocQueryLimitParameters = &restful.Parameters{
DocQueryPageNumParameters = &restful.Parameters{
DataType: "string",
Name: common.QueryLimit,
Name: common.QueryPageNum,
ParamType: goRestful.QueryParameterKind,
Desc: "limit,for example &limit=10",
Desc: "pageNum,for example &pageNum=10",
}
DocQueryOffsetParameters = &restful.Parameters{
DocQueryPageSizeParameters = &restful.Parameters{
DataType: "string",
Name: common.QueryOffset,
Name: common.QueryPageSize,
ParamType: goRestful.QueryParameterKind,
Desc: "offset,for example &offset=10",
Desc: "PageSize,for example &pageSize=10",
}
)

Expand Down
4 changes: 2 additions & 2 deletions server/resource/v1/history_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ func (r *HistoryResource) URLPatterns() []restful.Route {
ResourceFunc: r.GetPollingData,
FuncDesc: "get all history record of get and list",
Parameters: []*restful.Parameters{
DocPathProject, DocPathKeyID,
DocPathProject,
},
Returns: []*restful.Returns{
{
Code: http.StatusOK,
Message: "true",
Model: []model.KVDoc{},
Model: []model.PollingDetail{},
},
},
Consumes: []string{goRestful.MIME_JSON, common.ContentTypeYaml},
Expand Down
2 changes: 1 addition & 1 deletion server/resource/v1/history_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func TestHistoryResource_GetPollingData(t *testing.T) {
assert.Equal(t, kv.Labels, data.Labels)
})
t.Run("get polling data", func(t *testing.T) {
r, _ := http.NewRequest("GET", "/v1/test/kie/kv/record?instanceId=test&domain=default", nil)
r, _ := http.NewRequest("GET", "/v1/test/kie/record?instanceId=test&domain=default", nil)
noopH := &handler2.NoopAuthHandler{}
chain, _ := handler.CreateChain(common.Provider, "testchain1", noopH.Name())
r.Header.Set("Content-Type", "application/json")
Expand Down

0 comments on commit 42cd6ec

Please sign in to comment.