MCPcopy Index your code
hub / github.com/TruthHun/BookStack / IsResponseEmptyForAPP

Method IsResponseEmptyForAPP

models/options.go:346–362  ·  view source on GitHub ↗
(requestVersion, word string)

Source from the content-addressed store, hash-verified

344}
345
346func (m *Option) IsResponseEmptyForAPP(requestVersion, word string) (yes bool) {
347 version := GetOptionValue("CheckingAppVersion", "")
348 if version == "" {
349 return
350 }
351 if strings.ToLower(strings.TrimSpace(requestVersion)) == version {
352 words := strings.Split(GetOptionValue("CheckingForbidWords", ""), ",")
353 word = strings.ToLower(strings.TrimSpace(word))
354 for _, item := range words {
355 item = strings.ToLower(strings.TrimSpace(item))
356 if strings.Contains(word, item) {
357 return true
358 }
359 }
360 }
361 return
362}

Callers 3

CategoriesMethod · 0.95
SearchBookMethod · 0.80
SearchDocMethod · 0.80

Calls 1

GetOptionValueFunction · 0.85

Tested by

no test coverage detected