Skip to content

Commit c14cfa0

Browse files
authored
fix: wrong resp for create wip (#146)
1 parent 899193b commit c14cfa0

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

api/jiaozifs.gen.go

Lines changed: 16 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/swagger.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,6 +1372,12 @@ paths:
13721372
application/json:
13731373
schema:
13741374
$ref: "#/components/schemas/Wip"
1375+
201:
1376+
description: a new working in process created
1377+
content:
1378+
application/json:
1379+
schema:
1380+
$ref: "#/components/schemas/Wip"
13751381
400:
13761382
description: ValidationError
13771383
401:

controller/wip_ctl.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ func (wipCtl WipController) GetWip(ctx context.Context, w *api.JiaozifsResponse,
8585
}
8686
if isNew {
8787
w.JSON(wipToDto(wip), http.StatusCreated)
88+
return
8889
}
8990
w.JSON(wipToDto(wip))
9091
}

0 commit comments

Comments
 (0)