swagger聚合封装
This commit is contained in:
@@ -55,7 +55,7 @@ func init() {
|
||||
<script>
|
||||
window.onload = () => {
|
||||
window.ui = SwaggerUIBundle({
|
||||
url: '{SwaggerUIDocUrl}',
|
||||
url: '/swagger',
|
||||
dom_id: '#swagger-ui',
|
||||
});
|
||||
};
|
||||
@@ -97,7 +97,7 @@ func doRequest(ctx context.Context, method string, url string, target any, data
|
||||
}()
|
||||
result := response.ReadAll()
|
||||
resultStrut := &ghttp.DefaultHandlerResponse{}
|
||||
if gconv.Struct(result, resultStrut); resultStrut.Code != 200 {
|
||||
if gconv.Struct(result, &resultStrut); resultStrut.Code != 200 {
|
||||
err = errors.New(resultStrut.Message)
|
||||
} else {
|
||||
gconv.Struct(resultStrut.Data, target)
|
||||
|
||||
Reference in New Issue
Block a user