mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
ask api changes, so it wont search unnecesary question dbs
This commit is contained in:
parent
0463ab3cd2
commit
b53fd84bf2
5 changed files with 116 additions and 65 deletions
|
@ -263,6 +263,22 @@ function processIncomingRequestUsingDb(
|
|||
})
|
||||
}
|
||||
|
||||
export function shouldSearchDataFile(df: DataFile, testUrl: string): Boolean {
|
||||
if (typeof df.shouldSearch === 'string' && df.shouldSearch === 'always') {
|
||||
return true
|
||||
}
|
||||
|
||||
if (typeof df.shouldSearch === 'object') {
|
||||
if (df.shouldSearch.location) {
|
||||
const { val } = df.shouldSearch.location
|
||||
return testUrl.includes(val)
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: always return true if it gets here?
|
||||
return true
|
||||
}
|
||||
|
||||
export function shouldSaveDataFile(
|
||||
df: DataFile,
|
||||
recievedData: RecievedData
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue