Add helper util for authenticating the public API SDK in component plugins
This commit is contained in:
parent
398a65c821
commit
e2982e1454
|
@ -17,6 +17,7 @@ import { getAction } from "utils/getAction"
|
|||
import Provider from "components/context/Provider.svelte"
|
||||
import { ActionTypes } from "./constants"
|
||||
import { fetchDatasourceSchema } from "./utils/schema.js"
|
||||
import { getAPIKey } from "./utils/api.js"
|
||||
|
||||
export default {
|
||||
API,
|
||||
|
@ -36,4 +37,5 @@ export default {
|
|||
fetchDatasourceSchema,
|
||||
Provider,
|
||||
ActionTypes,
|
||||
getAPIKey,
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
import { API } from "api"
|
||||
|
||||
export const getAPIKey = async () => {
|
||||
const { apiKey } = await API.fetchDeveloperInfo()
|
||||
return apiKey
|
||||
}
|
Loading…
Reference in New Issue