Keep compta with Pierre Grimaud API
continuous-integration/drone/push Build is passing Details

This commit is contained in:
nemunaire 2022-10-23 20:17:58 +02:00
parent 1096c01f44
commit 70e5347878
1 changed files with 7 additions and 0 deletions

View File

@ -99,6 +99,13 @@ func convertLineType(old string) string {
func convertCode(t, code string) string {
if !strings.HasPrefix(code, "line:IDFM:") {
if t == "tram" && !strings.HasPrefix(code, "T") {
code = "T" + code
}
if t == "noctilien" && !strings.HasPrefix(code, "N") {
code = "N" + code
}
if len(code) != 6 || !strings.HasPrefix(code, "C") {
code = searchLine(t, code)
}