Updated web template handling of no template
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo docker rm postgres --force
|
||||
sudo docker run -d -p5432:5432 -e POSTGRES_USER="tapit" -e POSTGRES_PASSWORD="secret-tapit-password" -e POSTGRES_DB="tapit" --name postgres postgres
|
||||
sudo docker run -d -p5432:5432 -v `pwd`/postgres-data:/var/lib/postgresql/data -e POSTGRES_USER="tapit" -e POSTGRES_PASSWORD="secret-tapit-password" -e POSTGRES_DB="tapit" --name postgres postgres
|
||||
|
||||
@@ -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
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -64,6 +64,11 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 d-flex">
|
||||
<p *ngIf="router.url !== '/web-template/new'"><small><em>Note: Changing web template may affect your existing campaigns</em></small></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12 d-flex">
|
||||
<button type="button" (click)="submitNewWebTemplate()" class="btn btn-primary ml-2">Save Web Template</button>
|
||||
|
||||
Reference in New Issue
Block a user