Skip to content

Commit c89de9c

Browse files
author
Franck JEANNIN
committed
Update pipelines
1 parent f58ac13 commit c89de9c

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

auto.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,20 +174,20 @@ func AutoUpdateContact(id string) error {
174174
case "Prospect":
175175
switch c.StudyLevel {
176176
case "Seconde":
177-
c.Pipeline = "2026-2027"
177+
c.Pipeline = "2027-2028"
178178
case "Première":
179-
c.Pipeline = "2025-2026"
179+
c.Pipeline = "2026-2027"
180180
case "Terminale", "BAC", "BAC+1", "BAC+2", "BAC+3":
181-
c.Pipeline = "2024-2025"
181+
c.Pipeline = "2025-2026"
182182
}
183183
case "Relative", "Student Relative":
184184
switch c.StudyLevel {
185185
case "Seconde":
186-
c.Pipeline = "Relative 2026-2027"
186+
c.Pipeline = "Relative 2027-2028"
187187
case "Première":
188-
c.Pipeline = "Relative 2025-2026"
188+
c.Pipeline = "Relative 2026-2027"
189189
case "Terminale", "BAC", "BAC+1", "BAC+2", "BAC+3":
190-
c.Pipeline = "Relative 2024-2025"
190+
c.Pipeline = "Relative 2025-2026"
191191
}
192192
}
193193

@@ -292,21 +292,21 @@ func templateToSend(contact *GetContactItem) (template string, short *bool, fina
292292
}
293293
}
294294
if contact.Type == "Prospect" {
295-
if contact.Pipeline == "2024-2025" {
295+
if contact.Pipeline == "2025-2026" {
296296
if contact.Language == "fr-FR" {
297297
return "477339000002799418", short, &t
298298
} else {
299299
return "477339000006666202", short, &t
300300
}
301301
}
302-
if contact.Pipeline == "2025-2026" {
302+
if contact.Pipeline == "2026-2027" {
303303
if contact.Language == "fr-FR" {
304304
return "477339000002907148", short, &t
305305
} else {
306306
return "477339000006666174", short, &t
307307
}
308308
}
309-
if contact.Pipeline == "2026-2027" {
309+
if contact.Pipeline == "2027-2028" {
310310
if contact.Language == "fr-FR" {
311311
return "477339000006666309", short, &t
312312
} else {

contact.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ func GetContact(id string) (*GetContactItem, error) {
306306
defer r.Body.Close()
307307

308308
if r.StatusCode != http.StatusOK {
309-
b, err := ioutil.ReadAll(r.Body)
309+
b, err := io.ReadAll(r.Body)
310310
if err != nil {
311311
return nil, err
312312
}

deal.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"encoding/json"
66
"errors"
77
"fmt"
8-
"io/ioutil"
8+
"io"
99
"log"
1010
"net/http"
1111
"time"
@@ -129,7 +129,7 @@ func GetDeal(id string) (*DealGet, error) {
129129
defer r.Body.Close()
130130

131131
if r.StatusCode != http.StatusOK {
132-
b, err := ioutil.ReadAll(r.Body)
132+
b, err := io.ReadAll(r.Body)
133133
if err != nil {
134134
return nil, err
135135
}
@@ -159,7 +159,7 @@ func GetDealStageHistory(id string) ([]DealStage, error) {
159159
defer r.Body.Close()
160160

161161
if r.StatusCode != http.StatusOK {
162-
b, err := ioutil.ReadAll(r.Body)
162+
b, err := io.ReadAll(r.Body)
163163
if err != nil {
164164
return nil, err
165165
}
@@ -234,7 +234,7 @@ func GetDealIdsFromPipeline(pipeline string) ([]string, error) {
234234
return ids, nil
235235
}
236236
if r.StatusCode != http.StatusOK {
237-
b, err = ioutil.ReadAll(r.Body)
237+
b, err = io.ReadAll(r.Body)
238238
if err != nil {
239239
return nil, err
240240
}
@@ -274,7 +274,7 @@ func CreateDeal(item Deal) (string, error) {
274274
defer r.Body.Close()
275275

276276
if r.StatusCode != http.StatusCreated {
277-
b, err = ioutil.ReadAll(r.Body)
277+
b, err = io.ReadAll(r.Body)
278278
if err != nil {
279279
return "", err
280280
}
@@ -307,7 +307,7 @@ func UpdateDealStage(dealID string, stage string) error {
307307
defer r.Body.Close()
308308

309309
if r.StatusCode != http.StatusOK {
310-
b, err = ioutil.ReadAll(r.Body)
310+
b, err = io.ReadAll(r.Body)
311311
if err != nil {
312312
return err
313313
}
@@ -340,7 +340,7 @@ func UpdateDealLeadSource(dealID string, source string) error {
340340
defer r.Body.Close()
341341

342342
if r.StatusCode != http.StatusOK {
343-
b, err = ioutil.ReadAll(r.Body)
343+
b, err = io.ReadAll(r.Body)
344344
if err != nil {
345345
return err
346346
}
@@ -378,7 +378,7 @@ func FindDealByContactID(id string) (string, error) {
378378
}
379379

380380
if r.StatusCode != http.StatusOK {
381-
b, err = ioutil.ReadAll(r.Body)
381+
b, err = io.ReadAll(r.Body)
382382
if err != nil {
383383
return "", err
384384
}

0 commit comments

Comments
 (0)