mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 21:55:26 +00:00
* add team-id option * fix dashboard url when uploading to team --------- Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
27 lines
565 B
Go
27 lines
565 B
Go
package pdcp
|
|
|
|
import (
|
|
pdcpauth "github.com/projectdiscovery/utils/auth/pdcp"
|
|
urlutil "github.com/projectdiscovery/utils/url"
|
|
)
|
|
|
|
func getScanDashBoardURL(id string, teamID string) string {
|
|
ux, _ := urlutil.Parse(pdcpauth.DashBoardURL)
|
|
ux.Path = "/scans/" + id
|
|
if ux.Params == nil {
|
|
ux.Params = urlutil.NewOrderedParams()
|
|
}
|
|
if teamID != "" {
|
|
ux.Params.Add("team_id", teamID)
|
|
} else {
|
|
ux.Params.Add("team_id", NoneTeamID)
|
|
}
|
|
ux.Update()
|
|
return ux.String()
|
|
}
|
|
|
|
type uploadResponse struct {
|
|
ID string `json:"id"`
|
|
Message string `json:"message"`
|
|
}
|