mirror of
https://github.com/osmarks/meme-search-engine.git
synced 2024-11-13 23:34:49 +00:00
I hate precedence
This commit is contained in:
parent
b7010b41dd
commit
e705a9db21
@ -1,6 +1,4 @@
|
||||
import * as config from "../../frontend_config.json"
|
||||
import * as backendConfig from "../../mse_config.json"
|
||||
import * as formats from "../../formats.json"
|
||||
|
||||
export const getURL = x => config.image_path + x[1]
|
||||
|
||||
@ -13,10 +11,9 @@ export const doQuery = args => fetch(config.backend_url, {
|
||||
}).then(x => x.json())
|
||||
|
||||
export const hasFormat = (results, result, format) => {
|
||||
return result[3] && (1 << results.formats.indexOf(format)) !== 0
|
||||
return (results.formats.indexOf(format) != -1) && ((result[3] & (1 << results.formats.indexOf(format))) != 0)
|
||||
}
|
||||
|
||||
export const thumbnailURL = (results, result, format) => {
|
||||
console.log("RES", results)
|
||||
return `${config.thumb_path}${result[2]}${format}.${results.extensions[format]}`
|
||||
}
|
Loading…
Reference in New Issue
Block a user