Skip to content

Commit

Permalink
fix: get work v1 works_total_count
Browse files Browse the repository at this point in the history
  • Loading branch information
tosaken1116 committed Apr 13, 2024
1 parent c77caca commit 88bf1d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
PROTO_FILES = $(shell find ./proto/schema -name "*.proto" -type f)

.PHONY: build clean new fmt setup-mac setup-linux build-openapi build-msw
.PHONY: build clean new fmt setup-mac setup-linux build-openapi
build:
$(MAKE) build-openapi
$(MAKE) build-msw

clean:
rm -rf openapi
rm -rf msw
mkdir openapi
mkdir msw

build-openapi:
rm -rf openapi
Expand All @@ -22,11 +19,6 @@ build-openapi:
--openapiv2_opt allow_delete_body=true \
--openapiv2_opt json_names_for_fields=false

build-msw:
rm -rf msw
mkdir msw
protoc -I. --plugin=./protoc-plugin/protoc-gen-ts-msw-handlers/protoc-gen-ts-msw-handlers --ts-msw-handlers_out=./msw ./proto/schema/**/*.proto

new:
npx scaffdog generate service --output ./proto/schema

Expand Down
3 changes: 3 additions & 0 deletions openapi/api_definition.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,9 @@ definitions:
items:
type: object
$ref: '#/definitions/modelWork'
works_total_count:
type: integer
format: int32
worksUrlInfo:
type: object
properties:
Expand Down
2 changes: 1 addition & 1 deletion proto/schema/works/schema/works/resource.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ message CreateWorkRequest {
"}"
};
}
message GetWorksResponse { repeated .works.model.Work works = 1; }
message GetWorksResponse { repeated .works.model.Work works = 1; int32 works_total_count= 2;}

message GetWorksRequest {
int32 page = 1;
Expand Down

0 comments on commit 88bf1d2

Please sign in to comment.