1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-14 11:27:45 +01:00
Pinafore-Web-Client-Frontend/routes/_api/search.js
2018-02-24 14:49:28 -08:00

11 lines
323 B
JavaScript

import { getWithTimeout, paramsString } from '../_utils/ajax'
import { auth, basename } from './utils'
export function search (instanceName, accessToken, query) {
let url = `${basename(instanceName)}/api/v1/search?` + paramsString({
q: query,
resolve: true
})
return getWithTimeout(url, auth(accessToken))
}