Skip to content

Commit 93187c7

Browse files
chadiiichadiii
authored andcommitted
remove counter logic
1 parent 0166428 commit 93187c7

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

internal/api/syncFlags.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ type Flag struct {
5050
CodeLineHighlight int `json:"codeLineHighlight"`
5151
}
5252

53-
var counter = false
54-
5553
// SendFlagsToAPI takes file search result & sends flag info to the API
5654
func SendFlagsToAPI(cfg *config.Config, results []model.FileSearchResult) (err error) {
5755
flagUsageRequest := FlagUsageRequest{
@@ -168,11 +166,6 @@ func callAPI(cfg *config.Config, flagInfos FlagUsageRequest) error {
168166
return err
169167
}
170168

171-
if resp.StatusCode == 401 && !counter {
172-
counter = true
173-
callAPI(cfg, flagInfos)
174-
}
175-
176169
if resp.StatusCode != 201 {
177170
body, err := ioutil.ReadAll(resp.Body)
178171

0 commit comments

Comments
 (0)