Skip to content

Commit

Permalink
feat: verify if the cnjNumber is valid before decomposing it
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielFillol committed Oct 24, 2023
1 parent 6df37c5 commit 2e08a8f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion request/api_define_tj.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ import (
"strings"
)

func defineTJ(cnjNumber string) (string, error) {
func defineTJLawsuit(cnjNumber string) (string, error) {
isValid, err := CNJ.ValidateCNJ(cnjNumber)
if err != nil || !isValid {
return "", err
}

decomposedCNJ, err := CNJ.DecomposeCNJ(cnjNumber)
if err != nil {
return "", err
Expand Down

0 comments on commit 2e08a8f

Please sign in to comment.