UNPKG

@quoine/core

Version:

22 lines (18 loc) 508 B
import { quoine } from '@quoine/resources'; import normalize from './normalize'; const load = ({ all }) => { let url = '/privacy_policies'; if (all) { url = url + '?all=true' }; const options = { useCache: false, vendorId: process.env.REACT_APP_VENDOR_JFSA_ID, }; return quoine.get(url, options).then(normalize); }; const update = (version) => ( quoine.put('/users/term_version', { body: { term_version: version }, errorPrefix: 'term', }) ); export default { load, update };