From 80110a6960943da5e156fba3562504f4a20542cb Mon Sep 17 00:00:00 2001 From: eeckert Date: Mon, 15 Jan 2024 13:17:42 -0700 Subject: [PATCH] maybe fixed? --- main/main.go | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/main/main.go b/main/main.go index b0d47ed..8bf7eb0 100644 --- a/main/main.go +++ b/main/main.go @@ -37,7 +37,25 @@ func MPE_IsProject(input *Payload) (projectnumber string, project_name string) { for keyvalue, value := range separated_path { matched := project_regex.MatchString(value) // Possible Fix for Project 3rd Number ID. - ProjectSection := keyvalue == 2|3|4 // /shared<0>/N-Data<1>/<2>/<3>/<4>/<5>/<6> + var ProjectSection bool // <0>/shared<1>/N-Data<2>/<3>/<4>/<5>/<6>/<7> + + switch keyvalue { + case 0: + ProjectSection = false // "blank" + case 1: + ProjectSection = false // shared + case 2: + ProjectSection = false // N-Data + case 3: + ProjectSection = true // 2 digit + case 4: + ProjectSection = true // 2 digit client name + case 5: + ProjectSection = true // Project Number + case 6: + ProjectSection = true // Phase + + } if matched && ProjectSection { // if we match the Regex above, write values to SB. This will give us a string like "73|10 Office Of Somone|153 HelpMe|002 Phase 2"