import request, { Resp } from 'app/services/request'; type Options = { reCaptchaPublicKey: string }; let options: Resp; export default { async get(): Promise> { if (options) { return Promise.resolve(options); } const resp = await request.get('/api/options', {}, { token: null }); options = resp; return resp; }, };