Updated web template handling of no template
This commit is contained in:
@@ -206,13 +206,17 @@ func (tapit *Tapit) createCampaign(w http.ResponseWriter, r *http.Request) {
|
||||
for _, record := range newRecords {
|
||||
var newJob Job
|
||||
newJob.CurrentStatus = "Not Started"
|
||||
newJob.WebStatus = "Not Visited"
|
||||
newJob.ProviderTag = newCampaign.ProviderTag
|
||||
newJob.AccSID = newAccSID
|
||||
newJob.AuthToken = newAuthToken
|
||||
newJob.FromNum = newCampaign.FromNumber
|
||||
newJob.WebRoute = tapit.generateWebTemplateRoute()
|
||||
newJob.FullUrl = tapit.globalSettings.WebTemplatePrefix + newJob.WebRoute
|
||||
|
||||
// handle web template only if given
|
||||
if newCampaign.WebTemplateId != 0 {
|
||||
newJob.WebStatus = "Not Visited"
|
||||
newJob.WebRoute = tapit.generateWebTemplateRoute()
|
||||
newJob.FullUrl = tapit.globalSettings.WebTemplatePrefix + newJob.WebRoute
|
||||
}
|
||||
|
||||
// interpreting records
|
||||
var newBodyText string
|
||||
|
||||
Binary file not shown.
@@ -422,7 +422,7 @@ func (tapit *Tapit) webTemplateRouteHandler(w http.ResponseWriter, r *http.Reque
|
||||
newVisit.BodyContent = string(requestBody)
|
||||
rawReqBytes, err := httputil.DumpRequest(r, true)
|
||||
if err == nil {
|
||||
newVisit.RawRequest = string(rawReqBytes)
|
||||
newVisit.RawRequest = string(rawReqBytes) + string(requestBody)
|
||||
}
|
||||
|
||||
// Update visited status
|
||||
|
||||
Reference in New Issue
Block a user