Add projects
This commit is contained in:
parent
2d3a9ad623
commit
8b607dd700
1802 changed files with 503346 additions and 2 deletions
19
backend/internal/translator/common/interactions_usage.go
Normal file
19
backend/internal/translator/common/interactions_usage.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package common
|
||||
|
||||
import "github.com/tidwall/gjson"
|
||||
|
||||
func InteractionsUsage(root gjson.Result) gjson.Result {
|
||||
for _, path := range []string{
|
||||
"interaction.usage",
|
||||
"usage",
|
||||
"metadata.total_usage",
|
||||
"metadata.usage",
|
||||
"interaction.metadata.total_usage",
|
||||
"interaction.metadata.usage",
|
||||
} {
|
||||
if value := root.Get(path); value.Exists() {
|
||||
return value
|
||||
}
|
||||
}
|
||||
return gjson.Result{}
|
||||
}
|
||||
Loading…
Reference in a new issue