Skip to content

Commit

Permalink
(fix) update return object docs
Browse files Browse the repository at this point in the history
  • Loading branch information
leonjza committed Sep 22, 2024
1 parent fd9f55f commit a9e254d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/api/submit_single.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type submitSingleRequest struct {
// @Accept json
// @Produce json
// @Param query body submitSingleRequest true "The URL scanning request object"
// @Success 200 {string} string "Probing started"
// @Success 200 {object} models.Result "The URL Result object"
// @Router /submit/single [post]
func (h *ApiHandler) SubmitSingleHandler(w http.ResponseWriter, r *http.Request) {
var request submitSingleRequest
Expand Down Expand Up @@ -57,6 +57,9 @@ func (h *ApiHandler) SubmitSingleHandler(w http.ResponseWriter, r *http.Request)
if request.Options.Timeout != 0 {
options.Scan.Timeout = request.Options.Timeout
}
if request.Options.Delay != 0 {
options.Scan.Delay = request.Options.Delay
}
if request.Options.Format != "" {
options.Scan.ScreenshotFormat = request.Options.Format
}
Expand Down

0 comments on commit a9e254d

Please sign in to comment.